Skip to content

inline variables like in C #2

@Coldzer0

Description

@Coldzer0

Would love to see something like this in the future
inline variables like in C, and variable lifetime per block

program CPas;

Begin

  const X : int32 = 1;
  var Y : ^int32:= @X;
  Y^:= 2;
  WriteLn('X := ', X);

  // Code Block
  begin
    var Z : string = 'Hello from BlockA';
    WriteLn(Z);
  end;
  // this should not compile not in the same block
  WriteLn('Can I access Z? = ', Z); 
End. 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions