Page 1 of 1

Include File

Posted: Tue Jun 12, 2001 11:07 am
by Faiz
Hi,
I am using around 50 messages (by storing them in vortex variables), in the search scripts. Since having all of them in the scripts is redundancy, so I wanted an include file to store these messages. How can I do that in Vortex? I tried <spew> and <read>, but I can't access the variables declared in the include file.

Regards,

Include File

Posted: Tue Jun 12, 2001 11:47 am
by John
There are a few options available for this sort of thing. One is to use Vortex library modules to store code you want to use in several scripts.

If all you are doing is setting variables you might want to store them in a Texis table and read them from there, or even use the table for display.

A table with the fields varname and value could be processed as:

<SQL ROW "select varname, value from Table">
<setvar $varname $value>
</SQL>

or you could write a function to show a message:

<A NAME=showmsg Msg>
<SQL "select value from Table where varname = $Msg">
$value
</SQL>
</A>