[gradsusr] if else statement with string arguments
Howard Staines
rossby at rossby.co.nz
Mon Nov 26 15:40:44 EST 2018
Hi Trace,
if you have more than one 'region' why not try using a function
function call
locnos = 1
while locnos < 55
region = subwrd(getsite(locnos),1)
regionlat = subwrd(getsite(locnos),2)
regionlon = subwrd(getsite(locnos),3)
say region * This is good to get your script to echo back
whether function works
************************** functions
function getsite(locnos)
locnum = locnos
if locnum = 1
sitedat ="Crownthorpe -39.5868 176.5385"
endif
if locnum = 2
sitedat ="Longlands -39.6723 176.8242"
endif
if locnum = 3
etc
...
return sitedat
I find it very useful to loop through different regions for things like
meteograms.
Hope this helps
Howard Staines
Rossby consulting NZ
More information about the gradsusr
mailing list