-
Notifications
You must be signed in to change notification settings - Fork 2
Not Adopted
Syntax that has been considered during the revision but has not been adopted.
x := y ** z;
Rejected due to exponentiation being right associative, which makes implementation a lot more involved than it seems.
Rejected due to lack of clarity. The ampersand symbol &
was chosen because it is less ambiguous.
str := //Fred said "I don't know".\n//;
Rejected because string literals containing both single and double quotes can be produced via string concatenation.
str := 'Fred said "' & "I don't know" & '".\n';
<*IF arch = arm64*>
(* code *)
<*ELIF arch = x86*>
(* code *)
...
<*ENDIF*>
Rejected because it creates unreadable and unmaintainable source code. Architecture or platform specific variants should ALWAYS be furnished as separate architecture or platform specific library modules. These can easily be generated from a common source template and then be chosen accordingly by the build system.
PROCEDURE fooBar ( bar : Bar ) : Foo, Status;
(* then *)
foo, status := fooBar(bar);
This will be revisited in the future.
PROCEDURE Foo : Status;
VAR status : Status;
BEGIN
Step1;
IF status = Status.Failure THEN BAIL(1) END;
Step2;
IF status = Status.Failure THEN BAIL(2) END;
Step3;
IF status = Status.Failure THEN BAIL(3) END;
(* procedure returns here *)
RETURN Status.Success
BAILOUT
| 3 : UndoStep3;
| 2 : UndoStep2;
| 1 : UndoStep1;
(* procedure exits here *)
RETURN Status.Failure
END Foo;
This will be revisited in the future.
Copyright © 2015-2018 Modula-2 Software Foundation