No unique range/dimension .. token #5

Open
opened 2023-01-28 19:31:54 +00:00 by HippieKiller · 0 comments
HippieKiller commented 2023-01-28 19:31:54 +00:00 (Migrated from github.com)

Hi BeRo,
I noticed when looking through the code that the range .. symbol used in defining Array dimension doesn't have it's own token, and instead shares the TokColon token, which means you can compile weird stuff like this:

var x: packed array [1:5] of char;

instead of array [1..5], and also you can use the .. instead of : for defining types too

var y..char;

Hi BeRo, I noticed when looking through the code that the range `..` symbol used in defining Array dimension doesn't have it's own token, and instead shares the `TokColon` token, which means you can compile weird stuff like this: <code>var x: packed array [1:5] of char;</code> instead of `array [1..5]`, and also you can use the `..` instead of `:` for defining types too <code>var y..char;</code>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BeRo1985/berotinypascal#5
No description provided.