Files
RCBASIC4/doc/files/constants.html
2024-12-14 15:28:03 -05:00

21 lines
947 B
HTML

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>RCBasic Constants [RCBasic Doc] </title>
</head>
<body>
<p><h2>CONSTANTS </h2></p>
<p>
RCBasic has a special type of variable called a constant which can hold an expression. This means it can hold an expression and not determine its value until its used. For example you can have a constant called C that is equal to A + B. Everytime you change the value of A or B, C's value will also change. Because constants hold expressions, any valid expression in RCBasic can be stored in a constant.
</p>
<p id="rc_code"><code>
const&nbsp;&nbsp;A&nbsp;=&nbsp;<span class="rc_number">5</span>&nbsp;<br>
const&nbsp;&nbsp;MY_PRINT&nbsp;=&nbsp;<span class="rc_keyword">print</span>&nbsp;<span class="rc_string">"hello world"</span>&nbsp;<br>
</code></p>
<p>
</body>
</html>