Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
34
Task/Comments/S-BASIC/comments.basic
Normal file
34
Task/Comments/S-BASIC/comments.basic
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
rem S-BASIC of course allows traditional BASIC-style comments
|
||||
|
||||
comment
|
||||
In addition to the single-line REM statement, S-BASIC
|
||||
also supports multiline comments using COMMENT...END.
|
||||
Note that the terminating END must be the first token on
|
||||
a line of its own.
|
||||
end
|
||||
|
||||
comment
|
||||
When declaring a group of variables, S-BASIC allows
|
||||
a semi-colon, instead of the normal comma, as a separator,
|
||||
in which event an explanatory comment can follow the
|
||||
semi-colon and is ignored by the compiler.
|
||||
end
|
||||
|
||||
var n ; number of payments over life of loan
|
||||
ppy ; payments per year
|
||||
apr ; annual interest rate as a decimal
|
||||
amt ; principal amount of loan
|
||||
pmt ; amount of periodic payment
|
||||
= real
|
||||
|
||||
comment
|
||||
Finally, although statements in S-BASIC are normally terminated
|
||||
by an end-of-line, any logical statement can be continued on to
|
||||
the following physical line with a backslash, in which event
|
||||
anything after the backslash is ignored and can be used for
|
||||
a comment.
|
||||
end
|
||||
|
||||
if amt = 0 then \ user forgot to enter a value
|
||||
print "Must specify a loan amount!"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue