gdl icon indicating copy to clipboard operation
gdl copied to clipboard

PM: TITLE keyword incompatible with the FORMAT keyword

Open slayoo opened this issue 7 years ago • 6 comments

As reported on SF.net (https://sourceforge.net/p/gnudatalanguage/bugs/366/):

GDL> pm, [1,2], format='(I2)', title='PM'
% Type conversion error: Unable to convert given STRING: 'PM' to LONG.
0
1
2

slayoo avatar Apr 16 '18 12:04 slayoo

strangely this is occuring only if the procedure is called 'pm'. renaming it to 'mp' or anything else works.

GillesDuvert avatar Apr 16 '18 15:04 GillesDuvert

Gilles, do you mean renaming in libinit.cpp?

 961   const string pmKey[] = {"FORMAT", "TITLE", KLISTEND };
 962   new DLibPro(lib::pm, string("PM"), -1, pmKey);

slayoo avatar Apr 16 '18 15:04 slayoo

Ah I see. lib::pm wrongly uses the format with the title.

GillesDuvert avatar Apr 16 '18 15:04 GillesDuvert

I am lost here ! Some working parts of the code were removed. And the test stopped working ... I am on the way to revert that after some extra tests !

alaingdl avatar Jan 08 '24 00:01 alaingdl

Two important points:

  • PM : the doc does not mention any option, only "PM array, array2 ..." . So the code should be cleaned and the error will not appear anymore
  • the doc mentions "RM" also that does not exist in GDL!

GillesDuvert avatar Jan 08 '24 09:01 GillesDuvert

The IDL doc is wrong. Those codes are *pro in recent IDL distros, then interfaces and keywords are clear. I can write to NV5 to mention that but for me it is not important at all ! Just a side effect when I wrote the tests for SHMMAP, using /proc/self instead of ../src ...

alaingdl avatar Jan 08 '24 11:01 alaingdl