Hello - I'm running the debugger on a unidata program and need to set a variable to null. I remember there is a way to do this but do not remember how. I know you can always set a variable to a value through the \\ command...but to set to null. I'm remembering something like save or sv...can't quite remember.
Can anyone help here?
Kathleen
------------------------------
kathleen hambrick
Programmer
Rocket Forum Shared Account
------------------------------
Use the SV command as covered in the manuals to Set Variable
Attached a copy of the manual for you as well.
001: VAR = "HELLO"
002: CRT "VAR = " : VAR
003: DEBUG
004: CRT "VAR = " : VAR
005: END
:RUN BP TEST20
VAR = HELLO
***DEBUGGER called at line 3 of program BP\\_TEST20
!\\VAR
VAR=HELLO
Enter new value (hit <CR> for no change)=
!SV VAR ""
!G
VAR =
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Use the SV command as covered in the manuals to Set Variable
Attached a copy of the manual for you as well.
001: VAR = "HELLO"
002: CRT "VAR = " : VAR
003: DEBUG
004: CRT "VAR = " : VAR
005: END
:RUN BP TEST20
VAR = HELLO
***DEBUGGER called at line 3 of program BP\\_TEST20
!\\VAR
VAR=HELLO
Enter new value (hit <CR> for no change)=
!SV VAR ""
!G
VAR =
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Thank you
------------------------------
kathleen hambrick
Programmer
Rocket Forum Shared Account
------------------------------
Hello - I'm running the debugger on a unidata program and need to set a variable to null. I remember there is a way to do this but do not remember how. I know you can always set a variable to a value through the \\ command...but to set to null. I'm remembering something like save or sv...can't quite remember.
Can anyone help here?
Kathleen
------------------------------
kathleen hambrick
Programmer
Rocket Forum Shared Account
------------------------------
The SV command doesn't seem to work on attributes, MVs, or SVs...only full variables. Can I set a single attb of a dynamic array to null using the SV? Some other command? I'd like to make rec<5> null for instance while in the debugger.
------------------------------
kathleen hambrick
Programmer
Rocket Forum Shared Account
------------------------------
The SV command doesn't seem to work on attributes, MVs, or SVs...only full variables. Can I set a single attb of a dynamic array to null using the SV? Some other command? I'd like to make rec<5> null for instance while in the debugger.
------------------------------
kathleen hambrick
Programmer
Rocket Forum Shared Account
------------------------------
Kathleen
SV cannot set an attribute etc within an array, it is just for a variable.
It is possible to do what you wish, although it's not documented
001: VAR = ""
002: FOR SET.NXT = 1 TO 5
003: VAR<SET.NXT> = SET.NXT
004: NEXT SET.NXT
005: CRT "VAR = " : VAR
006: DEBUG
007: CRT "VAR = " : VAR
008: END
:RUN BP TEST20
VAR = 1þ2þ3þ4þ5
***DEBUGGER called at line 6 of program BP\\_TEST20
!\\VAR<3>
VAR<3>=3
Enter new value (hit <CR> for no change)= (For the new value I enter space)
!G
VAR = 1þ2þþ4þ5
:
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Kathleen
SV cannot set an attribute etc within an array, it is just for a variable.
It is possible to do what you wish, although it's not documented
001: VAR = ""
002: FOR SET.NXT = 1 TO 5
003: VAR<SET.NXT> = SET.NXT
004: NEXT SET.NXT
005: CRT "VAR = " : VAR
006: DEBUG
007: CRT "VAR = " : VAR
008: END
:RUN BP TEST20
VAR = 1þ2þ3þ4þ5
***DEBUGGER called at line 6 of program BP\\_TEST20
!\\VAR<3>
VAR<3>=3
Enter new value (hit <CR> for no change)= (For the new value I enter space)
!G
VAR = 1þ2þþ4þ5
:
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Thanks Jonathon - that seemed to work. But it does beg the question...if a space clears the multi or subvalue, then what sets it to just a space?
------------------------------
kathleen hambrick
Programmer
Rocket Forum Shared Account
------------------------------
Thanks Jonathon - that seemed to work. But it does beg the question...if a space clears the multi or subvalue, then what sets it to just a space?
------------------------------
kathleen hambrick
Programmer
Rocket Forum Shared Account
------------------------------
Begs an answer as you didn't try it
RUN BP TEST20
VAR = 1þ2þ3þ4þ5
***DEBUGGER called at line 6 of program BP\\_TEST20
!\\VAR<3>
VAR<3>=3
Enter new value (hit <CR> for no change)= (Two spaces entered)
!G
VAR = 1þ2þ þ4þ5
:
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Begs an answer as you didn't try it
RUN BP TEST20
VAR = 1þ2þ3þ4þ5
***DEBUGGER called at line 6 of program BP\\_TEST20
!\\VAR<3>
VAR<3>=3
Enter new value (hit <CR> for no change)= (Two spaces entered)
!G
VAR = 1þ2þ þ4þ5
:
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Well I did try it...but I didn't try two spaces - so it's spaces minus one with one space being nothing. Got it. Thank you for your help.
Kathleen
------------------------------
kathleen hambrick
Programmer
Rocket Forum Shared Account
------------------------------