diff options
author | kotleta2007 <kotleta2007@protonmail.ch> | 2024-04-12 12:46:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 12:46:12 +0200 |
commit | a74257f4076fc27f94324955c5a794990fd66a0d (patch) | |
tree | a0a870c2cb4cf984d1ae255570eb9d368ca0b952 | |
parent | 1baca665b842c6b346e524aaa14b75479e294db9 (diff) |
Update bc.html.markdown (#4892)
The global variable syntax and the pre-set variable syntax is invalid. On bc 1.07.1 it produced syntactic errors. I modified the tutorial so that it doesn't include these syntaxes.
-rw-r--r-- | bc.html.markdown | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bc.html.markdown b/bc.html.markdown index 1103d7bb..3420f766 100644 --- a/bc.html.markdown +++ b/bc.html.markdown @@ -41,15 +41,11 @@ if(hour < 12) { /*Operators are exactly like C.*/ \t: tab \\: backslash*/ } else { - /*Variables are global by default.*/ - thisIsGlobal = 5 - /*You can make a variable local. Use the "auto" keyword in a function.*/ + print "Good afternoon\n" } -/*Every variable is pre-set to 0.*/ -num = blankVariable /*num is set to 0.*/ - /*Like C, only 0 is falsy.*/ +num = 0 if(!num) {print "false\n"} /*Unlike C, bc does not have the ?: operators. For example, |