[community.freepascal.org reports a server error when posting, so I post here.]
Hi,
We are porting from Extended Pascal to Free Pascal, or at least we are looking into it to estimate the amount of work that is required. The biggest problem that we encounter so far is that Free Pascal does not support initial values in type declarations and record fields.
Our old code contains lots of type declarations like
type
scale = integer = 1024;
message = record
header : string = 'Attention';
body : string = '';
end;
If we take out the initial values, we will have to search all sources for places where variables of these types might be used uninitialised...
What would be the best way around this problem? Could this language feature be considered for inclusion in the compiler?
On a side note I can mention that
type
yes = boolean = true; // is accepted!
//no = boolean = false; // is not accepted.
which is probably not intended behaviour.
Thanks for any thoughts,
Bastiaan Veelo.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[community.freepascal.org reports a server error when posting, so I post here.]
Hi,
We are porting from Extended Pascal to Free Pascal, or at least we are looking into it to estimate the amount of work that is required. The biggest problem that we encounter so far is that Free Pascal does not support initial values in type declarations and record fields.
Our old code contains lots of type declarations like
type
scale = integer = 1024;
message = record
header : string = 'Attention';
body : string = '';
end;
If we take out the initial values, we will have to search all sources for places where variables of these types might be used uninitialised...
What would be the best way around this problem? Could this language feature be considered for inclusion in the compiler?
On a side note I can mention that
type
yes = boolean = true; // is accepted!
//no = boolean = false; // is not accepted.
which is probably not intended behaviour.
Thanks for any thoughts,
Bastiaan Veelo.
community.freepascal.org is back. Please reply to http://community.freepascal.org:10000/bboards/message?message_id=231129&forum_id=24082