Dear all,I have a structure specified by a macro:
def function {
def description { } ;
def calculation { } ;
};
and a macro for displaying the description of a function in a box ( type -b ):
def info {
%1 ; <--- possibly a problem
description ;
};
( 'description' is just a 'type' command which prints out some info on the
specific function ).
I use this to display an arbitrary function. Example:
def d_por {
def description { text ( Calculates porosity from density ) ; } ;
def calculation { ... } ;
};
which lets me do:
info d_por ;
to display the description of d_por. THIS WORKS FINE.
Now, I want 'info' to be a button in my window which asks the user for the
name of the function s/he want described:
getstring ( Enter function name ) ;
info ( %B ) ; <--- PROBLEM ???
The last line here should, according to the manual, be identical to
( if I entered "d_por" ):
info d_por ;
but the interpreter definately does not think so!
Appearently it is illegal to write:
%B ;
or
( %B );
even if it is legal to write:
%1
inside a macro.
What is wrong here? Is what I'm trying to do IMPOSSIBLE? Why?
So many thanks to anyone who can direct me towards the solution of this
problem.