getstr(strvar)
getstr(strvar, 1)
See also
Example:
i = sred("Shall we?", "y", "ny") if (i == 0) print "No" else print "yes"
Suppose in response to the HOC command: print fscan(), fscan() the user types: this is a number 1.3e4 this is not45 this is 25 Then HOC will print: 13000 25
while(1) print fscan()
notice that when no file is open, fscan scans the remainder of the hoc file
following only scans the numbers from 10 to 170
10
n
20
n 30 na 40 nan 50 nano 60 nanotube 70 ni 80 nai 90 Nan NaN
i 100 in 110 inf 120 infi 130 ib 140 inc 150 infinity 160 170 Inf INF
following scans the numbers
1 2 3 4 5 6 7 8 9 10
- + does not scan
1.1 -1.2 1.3e-4 1.4e+4 -1.5e5 -1.6e-1
1+2+3 scans just the "1"
4xxx5 scans just the "4"
1,2,3 scans just the "1"
3, 4, 5 scans the three numbers
now there will be an EOF error
See also
File.scanvar(), read, File.ropen(), File(), sscanf(), StringFunctions, getstr()