[Thread Prev][Thread Next][Index]

counting number of elements in a string array??



Hello,

I have a little problem when I do the following to count the number of elements I have in a string array:

yes? spawn ls
box.dat plot-xy-hlat.jnl plot-xy-ro.jnl plot-xy.set-mask.jnl
boxmar.dat plot-xy-precp.jnl plot-xy-t2m.jnl plot-xy.set-shakey.jnl
yes?
yes? let my_files = {"dummy", spawn: "ls box*.dat", "dummy"}
yes? list my_files
VARIABLE : {"dummy", SPAWN: "ls box*.dat", "dummy"}
SUBSET : 4 points (X)
1 / 1:"dummy"
2 / 2:"box.dat"
3 / 3:"boxmar.dat"
4 / 4:"dummy"
yes?
yes? let n = `my_files,return=iend`
!-> DEFINE VARIABLE n = 2002
yes? let n = `my_files,return=jend`
!-> DEFINE VARIABLE n = 0
yes? let n = `my_files,return=kend`
!-> DEFINE VARIABLE n = 0
yes? let n = `my_files,return=lend`
!-> DEFINE VARIABLE n = 0
yes?


Why is it so? Why do I not get n=4?
I'm likely to have done just a stupid mistake somewhere, but I don't see.

Emilie




____________________________________________________________
Emilie VANVYVE
Physicist, PhD student

Université catholique de Louvain (UCL)
Institut d'astronomie et de géophysique G. Lemaître (ASTR)
Chemin du Cyclotron, 2
1348 Louvain-la-Neuve (Belgium)
Phone : +32-(0)10-473300
Fax : +32-(0)10-474722
E-mail : vanvyve@astr.ucl.ac.be
Web : www.astr.ucl.ac.be

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement