Re: How to use global variable?

From: Jomarlen <jomarlen_at_aol.com>
Date: 1997/09/23
Message-ID: <19970923173001.NAA24451_at_ladder01.news.aol.com>#1/1


You can create a global simply by

:global.my_global := :block.item;

You don't have to declare it first.
Note that a global is ALWAYS char
so if your value is numeric your syntax will be  :global.my_global := to_cahr(:block.item);

You might want to check that the global
exists before trying to read from it. (If it doesn't exist you'll get an error)

You can do this with

default_value('','global.my_global');

Note quotes around name and no colon.

This effectively says

If global.my_global does not exist then
create it with a value of null (or any other value placed between the ''

See also the forms help using keyword global in the index tab. It is quite comprehensive.

Regards
John



John C. Lennon
Utility Partners Inc.
4300 West Tropicana Blvd LVO-UPL
Las Vegas NV 89103

FOR UTILITY PARTNERS EMPLOYMENT
OPPORTUNITIES VISIT www.utilpart.com

e-mail: jomarlen_at_aol.com
Web Site: http://members.aol.com/jomarlen/

The views expressed in this message
are those of the author and not
necessarily those of U.P. Inc.
and/or its employees.


>Subject: How to use global variable?
>From: King of Spades sleeps <jeremybi_at_iscs.nus.edu.sg>
>Date: 23 Sep 1997 07:02:46 GMT
>Message-id: <607pim$ddk_at_nuscc.nus.sg>
>
>hi,
> I currently have 2 modules/forms/files. The first form gets data
 from user,
>and then I want to pass this data
>to the second form. How do I do that ? Thanks a million for any help.
>
>--
>over & out,
>jeremy.bin.razali_at_home
>
> K i n G o F S p a D e s
>
> >>>> http://www.iscs.nus.sg/~jeremybi <<<<
>
>
Received on Tue Sep 23 1997 - 00:00:00 CEST

Original text of this message