Skip to content

Commit

Permalink
make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthijs Kamstra committed Dec 15, 2023
1 parent 0ec1248 commit b2ba20a
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 41 deletions.
13 changes: 9 additions & 4 deletions docs/12cli_input/code/build.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

-cmd echo " │ ├── cpp"
-cmd haxe build_cpp.hxml
-cmd echo " │ ├── cs"
-cmd haxe build_cs.hxml

# Compilation error
# C# compiler not found. Please make sure either Visual Studio or mono is installed or they are reachable by their path

# -cmd echo " │ ├── cs"
# -cmd haxe build_cs.hxml

# -cmd echo " │ ├── hl"
# -cmd haxe build_hl.hxml

-cmd echo " │ ├── interp (Eval)"
-cmd haxe build_interp.hxml
# -cmd echo " │ ├── interp (Eval)"
# -cmd haxe build_interp.hxml

-cmd echo " │ ├── java"
-cmd haxe build_java.hxml
-cmd echo " │ ├── lua"
Expand Down
10 changes: 6 additions & 4 deletions docs/12cli_input/code/build_cpp.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
# -debug
-dce full

--next
# this doesn't work with this class, but might work in the future

# run application
-cmd cd bin/cpp
-cmd ./Main
# --next

# # run application
# -cmd cd bin/cpp
# -cmd ./Main
10 changes: 6 additions & 4 deletions docs/12cli_input/code/build_cs.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
# -debug
-dce full

--next
# this doesn't work with this class, but might work in the future

# run application
-cmd cd bin/cs/bin
-cmd mono Main.exe
# --next

# # run application
# -cmd cd bin/cs/bin
# -cmd mono Main.exe
10 changes: 6 additions & 4 deletions docs/12cli_input/code/build_java.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
# -debug
-dce full

--next
# this doesn't work with this class, but might work in the future

# run application
-cmd cd bin/java
-cmd java -jar Main.jar
# --next

# # run application
# -cmd cd bin/java
# -cmd java -jar Main.jar
10 changes: 6 additions & 4 deletions docs/12cli_input/code/build_jvm.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# -debug
-dce full

--next
# this doesn't work with this class, but might work in the future

# run application
-cmd cd bin/jvm
-cmd java -jar Main.jar
# --next

# # run application
# -cmd cd bin/jvm
# -cmd java -jar Main.jar
10 changes: 6 additions & 4 deletions docs/12cli_input/code/build_lua.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
# -debug
-dce full

--next
# this doesn't work with this class, but might work in the future

# run application
-cmd cd bin/lua
-cmd lua main.lua
# --next

# # run application
# -cmd cd bin/lua
# -cmd lua main.lua
12 changes: 7 additions & 5 deletions docs/12cli_input/code/build_neko.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
# -debug
-dce full

--next
# this doesn't work with this class, but might work in the future

# run application
-cmd cd bin/neko
-cmd nekotools boot main.n
-cmd neko main.n
# --next

# # run application
# -cmd cd bin/neko
# -cmd nekotools boot main.n
# -cmd neko main.n
10 changes: 6 additions & 4 deletions docs/12cli_input/code/build_node.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
-dce full
-D js-es=6

--next
# this doesn't work with this class, but might work in the future

# run application
-cmd cd bin/node
-cmd node main.js
# --next

# # run application
# -cmd cd bin/node
# -cmd node main.js
10 changes: 6 additions & 4 deletions docs/12cli_input/code/build_python.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
# -debug
-dce full

--next
# this doesn't work with this class, but might work in the future

# run application
-cmd cd bin/python
-cmd python3 main.py
# --next

# # run application
# -cmd cd bin/python
# -cmd python3 main.py
15 changes: 11 additions & 4 deletions docs/12cli_input/code/src/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ package;

class Main {
public function new() {
trace("Do you want to continue? (y/n)");
var char:Int = Sys.getChar(true);
trace(char);
trace("----");
Sys.println("Do you want to continue? (y/n)");
var char:Int = Sys.getChar(false);
switch (String.fromCharCode(char).toLowerCase()) {
case 'y':
Sys.println('YES');
case 'n':
Sys.println('NO');
default:
Sys.println('Choose (y/n), have a nice day!');
}
Sys.println('char value: "${char}"');
}

static public function main() {
Expand Down

0 comments on commit b2ba20a

Please sign in to comment.