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

Combining declaration and always assignment #244

Open
rob-ng15 opened this issue Feb 28, 2023 · 0 comments
Open

Combining declaration and always assignment #244

rob-ng15 opened this issue Feb 28, 2023 · 0 comments

Comments

@rob-ng15
Copy link
Contributor

Presently, a "variable" to be always assigned a value ( unless overwritten in algorithm ) has to be declared, then always assigned.

uint1 OF = uninitialised; // OVERFLOW FLAG uint1 UF = uninitialised; // UNDERFLOW FLAG OF := 0; UF := 0; // HOLD AT ZERO

Would it be possible/desirable to combine the declaration and always assignment?

e.g.

unit OF := 0;

My caution is that we already have =, <: and <:: as possibilities, but was thinking from a code readability point of view, easier to declare and always assign a value together when commenting.

Rob.

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