Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
/* Main program */
n = 1
if \ datatype( n, wholenumber ) then
signal msg
if n < 1 | n > 3 then
signal msg
signal value n
3 : say 'This is the number 3'
2 : say ' This is the number 2'
1 : say ' This is the number 1'
return n
msg :
say ' This is an incorrect number '
exit 99
/* Main program */
n = 100
if \ datatype( n, wholenumber ) then
signal msg
say ' This is a whole number '
return 0
msg :
say ' This is an incorrect number '
/* Main program */
n = 100.45
if \ datatype( n, wholenumber ) then
signal msg
say 'This is a whole number'
return 0
msg :
say 'This is an incorrect number'
/* Main program */
testString = "Doe John M. 03/03/78 Mumbai India";
parse var testString name1 +10 name2 +10 birthday +10 town +20 country
say name1
say name2
say birthday
say town
say country
/* Main program */
testString = "Doe John M. 03/03/78 Mumbai India";
parse var testString name1 11 name2 21 birthday 31 town 51 country
say name1
say name2
say birthday
say town
say country