Jump to content

Recommended Posts

Posted

Hello all,

 

I'm trying to print a blank line to the command line but LISP doesn't seem to want to process a nil value. For example, If I run:

 

(princ "\n . ")

(princ "\n . ")

(princ "\n . ")

 

...I will get three lines with a single period.

 

However, if I run

 

(princ "\n ")

(princ "\n ")

(princ "\n ")

 

 

...No additional lines will print.

 

I would like to have a couple of blank lines print before my Lisp conclusion message:

 

(princ "\n ")

(princ "\n ")

(princ "\n Conversion Complete. ")

 

I went on to AfraLisp which told me to just use (princ) without any arguments but that didn't work either.

 

I even tried setting a variable to a blank space and then using "PROMPT" to print the variable but that didn't work either.

 

 

Any advice would be greatly appreciated.

 

Thanks

 

AJS

Posted

This is one way:

 

 (princ "\n\n\n Conversion Complete. ")

 

All this does is give three new line commands and then "prints" what follows to the command line.

The new line commands do not need to be isolated: you can stack them, as I did in the example above.

 

Steve

.

  • 5 years later...
Posted

I'm looking for a solution too. Adding multiple \n doesn't work, no additional blank lines shows. However they do show in F2 window.

 

Any more suggestions?

 

Thank you.

Posted

I believe the command-line will automatically truncate empty lines - to avoid this, a simple workaround is to print a non-printable character (such as Esc) so that the line will appear blank but won't be truncated, e.g.

(progn (princ "\n\033\n\033\nConversion Complete.") (princ))

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...