this post was submitted on 20 Dec 2023
486 points (100.0% liked)

196

16732 readers
2376 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 52 points 1 year ago* (last edited 1 year ago) (3 children)

Yes, you can end a statement in C or C++ as well.

[–] [email protected] 16 points 1 year ago (1 children)

And, dare I say it, Javascript.

[–] [email protected] 28 points 1 year ago* (last edited 1 year ago)

What the fuck? There are children here. Don't say shit like that.

[–] [email protected] 5 points 1 year ago

or begin a comment in Inno

[–] [email protected] 2 points 1 year ago (1 children)

What about Applesoft BASIC? Because I was pretty good at that on my Apple II, but I don't think there were semicolons.

Also, I don't know how to code, so I don't know what semicolons are for in code.

[–] [email protected] 3 points 1 year ago

BASIC statements end on new lines. The language does use a semicolon at the end of PRINT statements in order to omit printing a newline character at the end, but I believe that's the only use. (It's been about 20 years since I've done anything in BASIC.)

The meaning of a semicolon depends completely on the language. C and C-like languages (like Java and Rust) tend to use them to delimit the end of a statement.