Write-only variables #388

Open
opened 2022-06-07 21:50:55 +09:00 by zxq9 · 0 comments
zxq9 commented 2022-06-07 21:50:55 +09:00 (Migrated from gitlab.com)

Created by: radrow

Write-only variable is a variable that is set during contract initialization. Rules:

  • It has to be set in init function
  • It cannot be read by init or any function called by init
  • It cannot be written by any other function

Proposed syntax:

contract C =
  let x;
  entrypoint init(x_val : int) =
    x = x_val

  entrypoint get_x() = x
*Created by: radrow* Write-only variable is a variable that is set during contract initialization. Rules: - It has to be set in `init` function - It cannot be read by `init` or any function called by `init` - It cannot be written by any other function Proposed syntax: ``` contract C = let x; entrypoint init(x_val : int) = x = x_val entrypoint get_x() = x ```
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/sophia#388
No description provided.