vein icon indicating copy to clipboard operation
vein copied to clipboard

Syntax conditional for statement

Open 0xF6 opened this issue 3 years ago • 0 comments

  • [x] Proposed
  • [x] Triage: Completed
  • [ ] Prototype: not started
  • [ ] Implementation: not started
  • [ ] Specification: not started

Syntax

public foo(obj: FooObject): void
{
   for (auto i = 0; i != 10; i++) when obj != null
       obj.Action(i);
}

Ishtar view (transformation result)

public foo(obj: FooObject): void
{
   if (obj != null)
   {
       for (auto i = 0; i != 10; i++) when 
           obj.Action(i);
    }
}

0xF6 avatar May 31 '21 01:05 0xF6