Netlogo reading from file -
i trying read these values file,
[-1 -5 270] [-2 -5 270] [-3 -5 270] [-4 -5 270] [-5 -5 270]
i need first, second , third value each line.
open file, read in other file. then, use file-read read line in. format provide seems in same format list, can interpret line directly. side note, if not, read-line line string , parse want.
then use list extraction operator items relevant indices.
file-open “filename.txt” while [not file-at-end?] [ let line file-read show item 0 line show item 1 line show item 2 line ] file-close
Comments
Post a Comment