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
 All Forums
 Origin Forum
 Origin Forum
 Please help with LabTalk problem.

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
a_user Posted - 08/20/1998 : 3:19:00 PM
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.


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000