>/tmp/x: ?warning: last char not newline is a warning you get when you try to write a file that doesn't end with a newline, the other message: > I sometimes get the "?newline expected" error, is provoked by a syntax error in a command in the sam (command) window. For instance, try typing qx (and a newline) it expects nl after q On Thu, Jul 22, 2021 at 8:14 PM mcz wrote: > > * Must every sam file end with a newline? I.e. even files with simple > text? > > No, I don't think sam cares. > > > I sometimes get the "?newline expected" error, > > In sam version I use, it's just a warning. The file is saved without > newline at > the end, unless I add it there. > > > which I would like to avoid if possible. > > The best way to avoid the warning about the missing newline character is > to add > the missing newline character. > > Some programs (POSIX world, ANSI C) assume that every line ends with > newline > character, so most editors add it for you if it's missing. Sam apparently > thinks it's good to have it, but doesn't get in your way if you don't add > it. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T60b5c1929a63b077-Mee00a57a34c332edd0a4e2a0 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription