The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Please help with LabTalk problem.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

a_user

USA
0 Posts

Posted - 08/20/1998 :  3:19:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000