[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [4diac-dev] 4diac-ide: ST-array declaration syntax
|
Hi Ernst,
As far as I know, nobody can use variable declarations directly in a FB, so it should be safe to change it to the conformant version you propose, without any legacy mode.
Best regards,
Martin
--------------------------------------------------
Dipl.-Ing. Martin Melik-Merkumians
Advanced Mechatronic Systems
Automation and Control Institute (ACIN)
TU Wien
DVR-Number: 0005886
Gusshausstr. 27-29, room CA-05-38
1040 Vienna, Austria
Phone: +43 (0)1 588 01 37688
Fax: +43 (0)1 588 01 937688
Email: melik-merkumians@xxxxxxxxxxxxxxxxx
http://www.acin.tuwien.ac.at/
--------------------------------------------------
-----Ursprüngliche Nachricht-----
Von: 4diac-dev-bounces@xxxxxxxxxxx <4diac-dev-bounces@xxxxxxxxxxx> Im Auftrag von Ernst Blecha
Gesendet: Montag, 24. Februar 2020 09:27
An: 4diac-dev@xxxxxxxxxxx
Betreff: [4diac-dev] 4diac-ide: ST-array declaration syntax
Good morning everyone,
while working on the exporter i stumbled across the array declaration syntax used in 4diac. The current implementation resembles the C-Syntax for declaring arrays. This is different to what the standard describes.
The current syntax for declaring a BOOL-Array with 32 elements is as
follows:
VAR
BoolArray : BOOL [32];
END_VAR
The way it is described in the standard it should read VAR
BoolArray : ARRAY [0..31] OF BOOL;
END_VAR
This also allows to declare the range of the array to be not from 0-31 but any available range (e.g. 5-7).
Now my questions are:
Should we switch to the official way of declaring arrays?
If we switch over, should the "old" way still be supported?
If the "old" way will still be supported - should we have a switch (i.e.
pragma) to disable the legacy option?
If we switch over, should interface variables also allow to declare the range of the array?
Best regards,
Ernst Blecha
--
Ernst Blecha
LIT | Cyber-Physical Systems Lab
JOHANNES KEPLER
UNIVERSITY LINZ
Altenberger Straße 69
LIT Open Innovation Center
4040 Linz, Austria
ernst.blecha@xxxxxx
www.jku.at
_______________________________________________
4diac-dev mailing list
4diac-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/4diac-dev