Suggestion for adding a comment about the Readln() function for Univ_String

14 views
Skip to first unread message

Joakim Strandberg

unread,
Jan 13, 2019, 7:59:31 AM1/13/19
to ParaSail Programming Language
Glad to head a new release is imminent in the near future.

I was looking at the thread about "Converting C++ to Parasail" and found the following line of code:

const Line : optional Univ_String := Readln()

While trying out the Readln() command I could never get it to return null, only "" or a non-empty Univ_String. I guess null can be returned if there is some error but there is no comment about this in the aaa.psi file. I suggest adding a comment about the circumstances under which the Readln() function may return null.

Best regards,
Joakim

Tucker Taft

unread,
Jan 13, 2019, 9:34:00 AM1/13/19
to ParaSail Programming Language
Good suggestion.  I just added the following comments (or slight variations thereof) to each of the declarations of Readln:
        //  Read input up to a newline, from standard input.
        //  Return null value when reaching end of file of standard input
        //  (which can happen when standard input is coming from a file,
        //   or when user types control/D on a Unix-like platform).
Take care,
-Tuck

--
You received this message because you are subscribed to the Google Groups "ParaSail Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parasail-programming...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages