LISP & text screen word wrap

In Acad it would seem that the text screen would respect the end of lines in the string argument of a PROMPT call even when a newline was not explicitly stated. In Bricscad I'm getting just the last ~65 characters of each paragraph on screen. Is there a setting I'm missing?

Thanks,

Michael Bulatovich

www.PubCorr.ca

Comments

  • I don't know of any setting that controls this. Perhaps it is just an incompatibility.
    If by 'newline was not explicitly stated' you mean something like the code below, try changing (prompt) to (princ). I always thought that those two functions were very similar apart from the return value. But apparently they are not. If your code requires a nil return value you can create a function like (TestMyPrompt).

    [code]
    (defun TestMyPrompt (str)
      (princ str)
      nil
    )

    (prompt
    "\nPROMPT: Normally I try to keep prompts short and to the point.
    But in this case I am testing how Bricscad handles very long prompts.
    So on with this text. Etc." ; Only this last line will be displayed.
    )

    (princ
    "\nPRINC: Normally I try to keep prompts short and to the point.
    But in this case I am testing how Bricscad handles very long prompts.
    So on with this text. Etc."
    )

    (TestMyPrompt
    "\nTestMyPrompt: Normally I try to keep prompts short and to the point.
    But in this case I am testing how Bricscad handles very long prompts.
    So on with this text. Etc."
    )

    (princ)
    [/code]
  • From my experience, Acad has a kind of automatic word wrap, if lines are pretty long -
    this is what you mean with "when a newline was not explicitly stated" ?

    I just compared both - \n newline characters are properly respected with
    (prompt), (princ), (print), (prin1) on both systems, no difference.

    I also tried with
    for (prompt "aaaa.................................aaa") - around 120 characters - and
    Acad indeed wraps the single string at position 80 :-)
    Bricscad does not wrap at all, characters are simply streamded - to text window
    and commandline ... if you stratch Bricscad window, or text window, you will see it -
    no fixed word-wrap, Bricscad simply wraps when the particular line is full.

    Sometimes, the history part (the scrollable part) of docked or floating command window
    misses 1...2 lines - usually, hitting ESACPE helps to refresh.

    Many greetings to all !
This discussion has been closed.