Conditional Read statement
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-07-2014 09:50 PM
Create Date: Feb 18 2013 9:55AM
Hi,
In a script I'm working on I want to check if a variable exists and, if not, prompt the user for a value, like this:
But the $READ statement is executed regardless of whether the variable exists or not, but if the variable exists, the value I enter does not get saved to the variable.
I've tested the if statement, and it correctly detects if the variable exists or not.
Is this a bug or am I doing something wrong?
Edit: Perhaps I should mention that I'm running XOS 12.5.3.9 on a Summit X350-48t.
Best regards
Daniel (from Daniel_Warhammar)
Hi,
In a script I'm working on I want to check if a variable exists and, if not, prompt the user for a value, like this:
code:
if (!$VAREXISTS(oobmgt_mask)) then
set var oobmgt_mask $READ(Mask:)
endif
But the $READ statement is executed regardless of whether the variable exists or not, but if the variable exists, the value I enter does not get saved to the variable.
I've tested the if statement, and it correctly detects if the variable exists or not.
Is this a bug or am I doing something wrong?
Edit: Perhaps I should mention that I'm running XOS 12.5.3.9 on a Summit X350-48t.
Best regards
Daniel (from Daniel_Warhammar)
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-07-2014 09:50 PM
Create Date: Mar 13 2013 1:21PM
I've had this issue as well in 15.2.2.7, so you're not alone. (from pforristal)
I've had this issue as well in 15.2.2.7, so you're not alone. (from pforristal)
