Skip to content
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

LC0051: Raise diagnostic on exit() Method #920

Open
Arthurvdv opened this issue Feb 4, 2025 · 0 comments
Open

LC0051: Raise diagnostic on exit() Method #920

Arthurvdv opened this issue Feb 4, 2025 · 0 comments

Comments

@Arthurvdv
Copy link
Collaborator

Arthurvdv commented Feb 4, 2025

It's a fictional example based on one of today's code review.

internal procedure GetFireTruck(): Text[10]
var
    FireTruckLbl: Label 'FireTruck';
begin
    exit(FireTruckLbl);
end;

When translation, for example to Dutch "Brandweerwagen", it becomes a length of 14 characters which will result in an runtime error.
In this example the label should have a MaxLength or Locked property set.

FireTruckLbl: Label 'FireTruck', MaxLength = 20;
FireTruckLbl: Label 'FireTruck', Locked = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant