This repository was archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing read/write new keyword parameter
- Loading branch information
Showing
2 changed files
with
15 additions
and
18 deletions.
There are no files selected for viewing
18 changes: 8 additions & 10 deletions
18
src/org/rascalmpl/core/library/lang/rascalcore/compile/Examples/Tst0.rsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
module lang::rascalcore::compile::Examples::Tst0 | ||
|
||
import ValueIO; | ||
import IO; | ||
|
||
data D = d1(int n); | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
public int f(int n) = n; | ||
|
||
public int g() = 42; | ||
void main(){ | ||
v = d1(42); | ||
writeBinaryValueFile(|home:///tmp.txt|, v); | ||
println("written <v>"); | ||
} |
15 changes: 7 additions & 8 deletions
15
src/org/rascalmpl/core/library/lang/rascalcore/compile/Examples/Tst1.rsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
module lang::rascalcore::compile::Examples::Tst1 | ||
|
||
import lang::rascalcore::compile::Examples::Tst0; | ||
import ValueIO; | ||
import IO; | ||
|
||
data D(bool K = false) = d1(int n); | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
public int T1 = f(3); | ||
void main(){ | ||
v = readBinaryValueFile(#D, |home:///tmp.txt|); | ||
println("K = <v.K>, <v.K?>"); | ||
} |