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

@: must appear in the right-hand side of an assignment statement #178

Open
evanescente-ondine opened this issue Jul 25, 2024 · 0 comments
Open

Comments

@evanescente-ondine
Copy link

Hi,
I have an issue with the target name shorthand @
The following

procedure Deal (From, To: in out Deck; N: Card_Number) is
begin
	From	:= (@.Number + N, To.List (To.List'Last-N+1..To.List'Last) & @.List); --17
	To		:= (@.Number - N, @.list(@.List'[email protected]'Last-N)); --18
end Deal;

causes the errors:

x86_64-linux-gnu-gcc-13 -c cardpackage.adb
cardpackage.adb:17:29: error: must appear in the right-hand side of an assignment statement
cardpackage.adb:18:37: error: must appear in the right-hand side of an assignment statement
gnatmake: "cardpackage.adb" compilation error

Complete code here. If I change '@' by the corresponding left-hand name, it works.

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