Long variable name losing value

Scott Walker ScottWalker at RAMSystemsCorp.com
Fri Feb 15 15:52:59 PST 2008





-----Original Message-----
From:
filepro-list-bounces+scottwalker=ramsystemscorp.com at lists.celestial.com
[mailto:filepro-list-bounces+scottwalker=ramsystemscorp.com at lists.celest
ial.com] On Behalf Of Bruce Easton
Sent: Friday, February 15, 2008 6:18 PM
To: filepro list
Subject: Long variable name losing value

I'm seeing something kooky today where it appears that a long
variable is losing its value.

Here is not all, but what I hope are the relevant parts of the
prc table (runs from clerk - 5.014):

  1  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: exit
  2  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
@menu    If:
       Then:
  3  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: declare GLOBAL log_name(14,*)
  4  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: '
  5  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: '[this is the ONLY called table (no chained tables)]
       Then: CALL "setup"      '[setup does not reference "log_name"]
  6  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
.
.            '[debugger here shows log_name has a value]
158  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
process  If:
       Then: 'process file
159  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
.     [there are a couple of sys commands in here that are running
.      to completion OK]
233  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:  '[debugger shows log_name is blank and so is new(323)]
       Then: new(323)=log_name
234  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
.     [there is an import here that is successfully assigning
.      to other 'new' fields]
375  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
enndd    If:  '[the record is being created, all but field new(323)]
       Then: close new                         '[populated OK]
376  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -


To get around this, I have assigned a field ln(14,*)=log_name up
on line 4, then below that I now only assign 'new(323)' from ln.
Field new(323) is now getting its value OK this way.
Does anyone know why the long variable could lose its
value?  Also, this is on Windows, but I've not seen the same
behavior on our Unix version.

Bruce

Bruce Easton
STN, Inc.






Bruce,

Try:

declare global log_name(14,*,g)

so that log_name retains it's value between records.  

I'm just wondering if since @MENU happens before you are positioned on
any record if it retains it's value once you are on the first record.
It will NOT retain it's value between records.

Regards,


Scott





More information about the Filepro-list mailing list