[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::decbasic

Title:DEC BASIC Conference
Notice:SSB Kit Now available - Note 2.29
Moderator:TLE::HAYNES
Created:Wed Sep 15 1993
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:210
Total number of notes:976

201.0. "Initializing an RFA array?" by CSC32::COMULADA () Mon Mar 03 1997 18:45

Is there a way to re-initialize an RFA while in a 
program?

A customer was asking and I cannot find any reference
to this, except that they are initialized on startup
of program.
	He has an array of say 6 elements which he
may fill up on the first pass. The second pass only
fills up say 2 or 3 , so the others still have data,
and causes the app to loop. so he wants to see if he
can initialize the array on every return back from 
loop..

Any ideas?

Thanks,
T.RTitleUserPersonal
Name
DateLines
201.1EPS::VANDENHEUVELHeinMon Mar 10 1997 20:4920
    Hmmm, there is really no usefull value one can initialize an RFA to.
    It is an opaque 6 byte strucure. Best the compiler/RTL can do is to
    initialize it to all zero. Best you can do is to take an 'initialized'
    array element copy it to an RFA variable (named 'initial_rfa' perhaps).
    Then when you need to re-initialized the array, just copy that saved
    element value to as many array elements as needed.
    
    I suspect however that the proper solution to your problem is to NEVER
    rely on RFA (array element) value unless the program dynamically read it.
    Thus they would add a variable to their program to indicate how many
    RFA array elements are currently valid and incorporated that into their
    loop control.
    
    Finally, you could make that array static, stick it in a MAP and
    overlay it with a piece of string, saing / restoring the string as
    a way to save / restore the RFA patterns.
    
    Hein.
    
201.2Thanks Hein, will pass it on....CSC32::COMULADAWed Mar 12 1997 12:300