Skip to content

Commit

Permalink
example code update && version code update
Browse files Browse the repository at this point in the history
  • Loading branch information
BHznJNs committed May 3, 2023
1 parent 291c1ed commit 019a14a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "calculator"
version = "1.7.2"
version = "1.7.3"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
1 change: 1 addition & 0 deletions examples/syntax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- [Variable](./variable.calcrs)
- [Operator](./operators.calcrs)
- [Input-Output](./input-output.calcrs)
- [IF-Condition](./if.calcrs)
- [Loop](./loop.calcrs)
- [Function](./function.calcrs)
Expand Down
10 changes: 10 additions & 0 deletions examples/syntax/input-output.calcrs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Basic

out "test content"
# 'test content'

out 999999
# 999999

out input("Please input something here: ") # test content
# 'test content'
2 changes: 1 addition & 1 deletion src/exec/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn import_all(

pub fn repl(scope: &mut Scope) -> ! {
// print program name and version
println!("Calculator.rs v1.7.2");
println!("Calculator.rs v1.7.3");
// import stantard libraries
if import_all(scope).is_err() {
println!("Standard module import error.");
Expand Down
3 changes: 0 additions & 3 deletions src/public/std/modules/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ pub fn implement(
io::stdin()
.read_line(&mut input)
.unwrap();
for ch in input.chars() {
println!("char: {}", ch as i8);
}

// remove the "\r\n" at the end of input
if input.ends_with('\n') {
Expand Down

0 comments on commit 019a14a

Please sign in to comment.