Author Topic: Error PPF on formatting a list  (Read 1598 times)

0 Members and 1 Guest are viewing this topic.

Giuseppe Beatrice

  • Newt
  • Posts: 43
Error PPF on formatting a list
« on: February 23, 2020, 01:23:14 PM »
Good morning to all.
I have had a problem on formatting a subfunction containing that simple alist:
(setq altc@ '(("TRIFASE CON NEUTRO" "3F+N" "L1-L2-L3-N" 3 4) ("TRIFASE" "3F" "L1-L2-L3" 3 3) ("MONOFASE" "F+N" "L-N" 1 2)))
In response, Visual Lisp responds with a message of error ending with the phrase... "PPF internal: non-plain"
The error doesn't appair if I format the alist as here:
(setq altc@ (list ("TRIFASE CON NEUTRO" "3F+N" "L1-L2-L3-N" 3 4) ("TRIFASE" "3F" "L1-L2-L3" 3 3) ("MONOFASE" "F+N" "L-N" 1 2)))
Can you explain me the reason of this behavior?

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Error PPF on formatting a list
« Reply #1 on: February 23, 2020, 04:05:32 PM »
Your first list construction is correct but the second proposal one is incorrect and it could be as follows:
Code - Auto/Visual Lisp: [Select]
  1. (setq altc@ (list (list "TRIFASE CON NEUTRO" "3F+N" "L1-L2-L3-N" 3 4) (list "TRIFASE" "3F" "L1-L2-L3" 3 3) (list "MONOFASE" "F+N" "L-N" 1 2)))
  2.  

How did you iterate through the list which happen to throw that error?

VovKa

  • Water Moccasin
  • Posts: 1628
  • Ukraine
Re: Error PPF on formatting a list
« Reply #2 on: February 23, 2020, 05:19:42 PM »
Can you explain me the reason of this behavior?
it's a bug
as i remember correctly i had to change '(...) to (quote (...))

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: Error PPF on formatting a list
« Reply #3 on: February 23, 2020, 05:38:08 PM »
There's another thread here somewhere which discusses this particular bug, I think it may be similar to this.

Giuseppe Beatrice

  • Newt
  • Posts: 43
Re: Error PPF on formatting a list
« Reply #4 on: February 24, 2020, 05:03:09 AM »
Thank you all.
Tharwat: it's true, it was my mistake in transcribing the list in the second way
Lee Mac: the list is built correctly with both instructions, the error occurs when I run a formatting command, while in the thread mentioned the list was not accepted
Vovka: the same happens to me too, so I'm fully convinced it's a bug

Giuseppe Beatrice

  • Newt
  • Posts: 43
Re: Error PPF on formatting a list
« Reply #5 on: February 24, 2020, 10:21:45 AM »
I have noted that's a question of total length if the list: in my case total length of instruction on a row
(setq altc@ '(("TRIFASE CON NEUTRO" "3F+N" "L1-L2-L3-N" 3 4) ("TRIFASE" "3F" "L1-L2-L3" 3 3) ("MONOFASE" "F+N" "L-N" 1 2)))
is 122; if I reduce the length to 115 formatting was positive.
This is all for the sake of completeness :reallysad:
« Last Edit: February 24, 2020, 11:02:41 AM by Giuseppe Beatrice »