Running into a bit of a snag here. Hope this is not too lame, but I am going cross-eyed.
Running the following test code -
code:
cls
break on
$1st=ltrim(split(@ipaddress0,'.')[0])
$2nd=ltrim(split(@ipaddress0,'.')[1])
$3rd=ltrim(split(@ipaddress0,'.')[2])
$4th=ltrim(split(@ipaddress0,'.')[3])
$ipadr='$1ST.$2ND.$3RD.$4TH'
SELECT
CASE
$2nd=13
MIGRATE
SCRIPT
CASE
$2nd=53 OR $2nd=110 OR $2nd=38 OR $2nd=126
GOTO SCRIPT
CASE
$2nd=50
$subnetname=Split('0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 23 195')
FOR EACH $element IN $subnetname
?$element
IF $element=$3rd
MIGRATE
SCRIPT
ELSE
SCRIPT
ENDIF
NEXT
;CASE 1
; GOTO SCRIPT
ENDSELECT
get $
?"Stop here"
FUNCTION MIGRATE()
?"MIGRATE"
get $
ENDFUNCTION
FUNCTION SCRIPT()
?"SCRIPT"
ENDFUNCTION
get $
So.. What is going on? If I am at the 195 sub-subnet, it wants to run all of the others first. What I really need is to evaluate the whole array and then go on.
Kent