diff --git a/README.md b/README.md new file mode 100644 index 0000000..a831ddd --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +To do: + +- [ ] Write README +- [ ] Add show more info version +- [ ] Add division? +- [ ] Read from file? +- [ ] Save to file? +- [ ] Program into a small device, like a calculator? +- [ ] Allow comments? + - Use a sed filter? + + +go run main.go < model.f +sed 's|//||' model.f | go run main.go + diff --git a/f.sh b/f.sh new file mode 100755 index 0000000..f581adb --- /dev/null +++ b/f.sh @@ -0,0 +1,9 @@ +#!/bin/bash +#while IFS= read -r line; do echo "$line" | sed 's| //.*||' | go run main.go + +# while IFS= read -r line; do echo "$line" | sed 's|//.*||'; done | go run main.go + + +sed -u 's|//.*||' | go run main.go +# ^ sed unbuffered. +# cat | tee -a log.f | sed -u 's|//.*||' | go run main.go | tee -a log.f diff --git a/log.f b/log.f new file mode 100644 index 0000000..60c2765 --- /dev/null +++ b/log.f @@ -0,0 +1,8 @@ +1 10 +=> 1.0 10.0 +1 100 +=> 2.4 415.0 +1 100 // +=> 1.0 100.0 +1 10 // hello world +=> 2.4 415.0 diff --git a/model.f b/model.f new file mode 100644 index 0000000..cdc8a99 --- /dev/null +++ b/model.f @@ -0,0 +1,2 @@ +1 10 +2 20