Add 2006/monge/try scripts
The alt script will reconfigure the width, height and iterations for the second invocation. Note that in some platforms this entry will not work (this is documented in the remarks). That is one of the reasons there is only one expression tested as one of the platforms it will not work with is arm64 which is what I primarily use.
This commit is contained in:
1 parent
2d4b008d00
commit
1cd8c28280
4 files changed
+70
-10
No files matched your search
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2006/monge
|
||||
#
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
make CC="$CC" all >/dev/null || exit 1
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./monge \"z = 0\" \"z = z*z*z + c; Abs2(z) < 4\": "
|
||||
echo 1>&2
|
||||
./monge "z = 0" "z = z*z*z + c; Abs2(z) < 4"
|
||||
echo 1>&2
|
||||
|
||||
|
||||
Reference in new issue
Block a user