Skip to content

Record terminator slash (/) in format not supported #830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lwymarie opened this issue Sep 2, 2020 · 1 comment
Closed

Record terminator slash (/) in format not supported #830

lwymarie opened this issue Sep 2, 2020 · 1 comment
Labels
antlr Requires antlr know-how bug Something isn't working

Comments

@lwymarie
Copy link

lwymarie commented Sep 2, 2020

IDL input and output:

IDL> print,'NOTE: Calling sequence to IFSF_LINELIST has changed. If vacuum',$
IDL> ' wavelengths are required, or other wavelength units, or ',$
IDL> ' to suppress this message, use ARGSLINELIST structure in ',$
IDL> ' initialization procedure. Default is now air waves.',$
IDL> format='(A0/A0/A0/A0)'
NOTE: Calling sequence to IFSF_LINELIST has changed. If vacuum
wavelengths are required, or other wavelength units, or
to suppress this message, use ARGSLINELIST structure in
initialization procedure. Default is now air waves.

GDL output is not as expected:

GDL> print,'NOTE: Calling sequence to IFSF_LINELIST has changed. If vacuum',$
GDL> ' wavelengths are required, or other wavelength units, or ',$
GDL> ' to suppress this message, use ARGSLINELIST structure in ',$
GDL> ' initialization procedure. Default is now air waves.',$
GDL> format='(A0/A0/A0/A0)'
% PRINT: Infinite format loop detected.
% Execution halted at: $MAIN$

@GillesDuvert GillesDuvert added antlr Requires antlr know-how bug Something isn't working labels Sep 2, 2020
@GillesDuvert
Copy link
Contributor

Thanks for the report!
in other terms,
print,"a","b",format='(a/a)' is badly handled by the GDL interpreter.
The documentation says that '/' and ',' are both format separators, not only ','.
To be solved...
Note that format='(a/,a)' works and is a temporary solution.

GillesDuvert pushed a commit to GillesDuvert/gdl that referenced this issue Feb 8, 2025
- strings and octals correctly defined in accordance with IDL8.8 + 
 ( a="8ull & print,a produces a STRING (yes!) and  a="7ull & print,a prints 7 as "7ull is an octal.

- close also gnudatalanguage#830 the SLASH is now correctly supported in formats.
GillesDuvert added a commit that referenced this issue Feb 9, 2025
Co-authored-by: Giloo <gildas@localhost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
antlr Requires antlr know-how bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants