DMDScript - readln() - how to detect EOF vs. a blank line?
- ed_davis2 at yahoo.com (4/4) Dec 29 2004 Using the stand-alone version of dscript, how do you tell when there is ...
- Walter (4/7) Jan 01 2005 more
-
Anthony Borla
(18/27)
Jul 21 2005
"Walter"
wrote in message
Using the stand-alone version of dscript, how do you tell when there is no more standard input, as in: ds foo.js <file.txt Thanks!
Dec 29 2004
"ed_davis2 at yahoo.com" <ed_davis2_member pathlink.com> wrote in message news:cqv0he$1f2e$1 digitaldaemon.com...Using the stand-alone version of dscript, how do you tell when there is nomorestandard input, as in: ds foo.js <file.txtThere currently isn't a way. I should probably fix that!
Jan 01 2005
"Walter" <newshound digitalmars.com> wrote in message news:cr6o46$bfu$1 digitaldaemon.com...Greetings,"ed_davis2 at yahoo.com" <ed_davis2_member pathlink.com> wrote in message news:cqv0he$1f2e$1 digitaldaemon.com...I recently had a look at DMDScript 1.06 [standalone version] and noticed that this situation still exists. Would it be possible to remedy this for the next release ? For example, might it not be useful to return 'null' on EOF, thus allowing this sort of construct: var line = readln(); while (line != null) { ... line = readln(); } It would certainly enhance the utility of what appears to be quite a fine product. Cheers, Anthony BorlaUsing the stand-alone version of dscript, how do you tellwhen there is no morestandard input, as in: ds foo.js <file.txtThere currently isn't a way. I should probably fix that!
Jul 21 2005