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

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -