significance of newline in io?

Paul Sanwald <[email protected]>
Newsgroups gmane.comp.lang.io
Message-ID <CALWYPHVKHwAfNXgD-e48EABYJ0VUcPhS5dqCE65psp-6wxH8LA@mail.gmail.com>
working through "7 languages in 7 weeks", I noticed something interesting.
This method definition me an error when invoking:
Object ancestors := method(
    prototype := self proto
    if (prototype != Object,
        writeln("Slots of ",prototype type,"\n-------")
        prototype slotNames foreach(slotName, writeln(slotName))
        writeln prototype ancestors))

Whereas, this definition does not:

Object ancestors := method(
    prototype := self proto
    if (prototype != Object,
        writeln("Slots of ",prototype type,"\n-------")
        prototype slotNames foreach(slotName, writeln(slotName))
        writeln
        prototype ancestors))

the only difference here is the newline after "writeln". what is the
significance of the newline in the language? am I missing something in the
docs?

thanks for your help!

--paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.