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

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1991.0. ".GOTO #symbol in a UDP or script ???" by COPCLU::ELIN (Elin Christensen @DMO, DTN 857-2406) Fri Dec 18 1992 09:35

    
    Is it possible to use a variable in a .GOTO script directive in a UDP?
    
    My customer wants to assign a value to a symbol (using a .IF directive)
    and use that symbol in a .GOTO directive, but the symbol does not get
    substituted with its value.
    
    I have tried this:
    
    .clear 24,1
    .fu get #START = "2"
    .goto #START
    
    .label 1
    .prompt 24,"Label 1 "
    
    .label 2
    .prompt 24,"Label 2 "
    
    
    The UDP fails, because it wants to goto .label #START and not to
    .label 2.
    
    I get these messages:
    %OA-W-SCPNOLABEL, Missing .GOTO-label "#START" in script 
    %OA-W-SCPERRLIN, Error occurred while the command ".goto #START" was
    executing.
    
    Is it possible to get the symbol translated?
    
    Elin
T.RTitleUserPersonal
Name
DateLines
1991.1I don't think soCESARE::EIJSAll in 1 PieceFri Dec 18 1992 15:1821
    
    Hi Elin,
    
    I'm afraid it won't work. Even:
    
    	.fu get oa$function = ".if #START == #START then .goto " #START
    
    doesn't work.
    
    You're probably best of by:
    
    .clear 24,1
    .fu get #START = <whatever>
    .if #START = 1 then .goto 1
    .if #START = 2 then .goto 2
    
    but this requires that you know the possible values of #START.
    
    Ciao,
    
    	Simon
1991.2CASE function ????GIDDAY::SETHIMan from DownunderSun Dec 20 1992 22:186
    Hi All,
    
    I wonder if in a future release we could have a CASE function ?  Just a
    thought.
    
    Sunil
1991.3Try to get .JUDGE to workHVNBND::WARFORDRichard Warford @CEO DTN 367-5455Mon Dec 21 1992 13:399
    Well you sort of have one now....
    
    The .JUDGE works like a case... Except it requires the value to be
    checked to be in the symbol OA$SCRIPT_PSIB. This used to be writeable
    but in V2.4 was apparently made read only or something.... If your
    dealing with user input from a SCRIPT script it will work fine...
    Or you might try adding OA$SCRIPT_PSIB to the writable symbol table.
    
    Rick
1991.4A wish for a PFRCOPCLU::ELINElin Christensen @DMO, DTN 857-2406Wed Dec 23 1992 10:2819
    re .1
    
    The customer right now uses .IF directives, but with 20 possible values
    of #START he has to write 20 .IF directives 
    - that would not have been nescessary if .GOTO could translate a
    symbol.
    
    In that case we would have been able to 
    omit all the .IF directives, 
    prompt the user for a string, 
    assign that string to the symbol #START, and
    .GOTO #START 
    
    
    Well, I accept that symbols cannot be used in .GOTO directives in v3.0.
    Is there a chance for a change in this functionality in a PFR?
    
    Elin