Skip to content

Commit

Permalink
Update bc.html.markdown (#4892)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kotleta2007 authored Apr 12, 2024
1 parent 1baca66 commit a74257f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bc.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a74257f

Please sign in to comment.