FlameZone
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 5455 |
|
|
| 10 Feb 2015 10:19 PM |
I was learning C++ and after the end of the part of code you'd put a ' ; '
level 100 (master baiter) |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2015 10:23 PM |
Lol, that's nothing to do with a command line, that's how you end statements in C++.
Just space it out and it'll work automatically. |
|
|
| Report Abuse |
|
|
vacharya
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 511 |
|
|
| 10 Feb 2015 10:25 PM |
press Return (⏎) or enter nothing needed between lines :D |
|
|
| Report Abuse |
|
|
FlameZone
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 5455 |
|
|
| 10 Feb 2015 10:26 PM |
........................
oh...
Excuse my Newbies .. I've never really Scripted or Programmed.
level 100 (master baiter) |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 10 Feb 2015 10:55 PM |
You can use ; if you want to though
It isn't needed though
if true then; print("Okay"); end;
Is the same as
if true then print("Okay") end
You can also use it instead of "," in a table
Example
local array = {"a", "b", "c"}
Is the same as
local array = {"a"; "b"; "c";}
I use it instead of , because it looks better Especially if you make your table take up more than one line like
local array = { "a"; "b"; "c"; }
Or
local array = { a = 1; b = 2; c = 3; }
I also use it when making a variable local
local variable Is the same as local variable; Is the same as local variable = nil Is the same as local variable = nil;
(Just to localize a variable)
I also use it when returning things
function addTwo(x) return (x + 2); end
But besides using it in place of "," in tables, it does nothing. |
|
|
| Report Abuse |
|
|