Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

New line

 [1/3] from: john::thousand-hills::net at: 12-Aug-2001 21:50


I have tried the following two print commands, and cannot force a NEW LINE to invoke. What am I doing wrong? either b > 2 [ print "Product 1 Spice Pouch " print a print " Quantity " print b print "^/" ] [ print " " ] and either b > 2 [ print "Product 1 Spice Pouch " print a print " Quantity " print b print "#^/" ] [ print " " ] /john

 [2/3] from: arolls::bigpond::net::au at: 13-Aug-2001 14:09

Re: New line - #"^/" == newline, not "#^/"


What? Where do you want the newline? I see lots of them. :) To print a single character, the hash should come before the quoted part: type? #"^/" == char! type? "#^/" == string! In your second attempt, it appears that you are trying to print a char!, but it's not written correctly.
> I have tried the following two print commands, and cannot force a > NEW LINE
<<quoted lines omitted: 5>>
> either b > 2 [ print "Product 1 Spice Pouch " print a print " Quantity " > print b print "#^/" ] [ print " " ]
should be: ... print #"^/" Is that it? You can also: print newline

 [3/3] from: al:bri:xtra at: 13-Aug-2001 16:17

Re: New line


John wrote:
> I have tried the following two print commands, and cannot force a NEW LINE
to invoke.
> What am I doing wrong? > > either b > 2 [ print "Product 1 Spice Pouch " print a print " Quantity " > print b print "^/" ] [ print " " ] > > and > > either b > 2 [ print "Product 1 Spice Pouch " print a print " Quantity " > print b print "#^/" ] [ print " " ]
Here's what I get with your first solution:
>> a: "aaaa"
== "aaaa"
>> b: 4
== 4
>> either b > 2 [ print "Product 1 Spice Pouch " print a print " Quantity "
[ print b print "^/" ] [ print " " ] Product 1 Spice Pouch aaaa Quantity 4
>>
Note the extra newline after the line containing the "4". If you need to print an extra newline, here's two solutions:
>> print "^/" >> print newline
Here's a solution to what I think you want: either b > 2 [ print ["Product 1 Spice Pouch" a "Quantity" b] ][ print "" ] And here is what it produces: Product 1 Spice Pouch aaaa Quantity 4 I hope that helps! Andrew Martin ICQ: 26227169 http://zen.scripterz.org

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted