mirror of
https://github.com/QB64Official/qb64.git
synced 2024-09-28 11:17:47 +00:00
69 lines
737 B
Markdown
69 lines
737 B
Markdown
A **expression** is a calculation used as a argument or assignment and can be a numerical or string expression.
|
|
|
|
Expressions may include logical operators as well as mathematical operators and functions and are used in various forms in a program.
|
|
|
|
**Examples of different kind of expressions:**
|
|
|
|
## Numerical Expressions
|
|
|
|
(**1000** is the expression)
|
|
|
|
```vb
|
|
|
|
PRINT 1000
|
|
|
|
```
|
|
|
|
```text
|
|
|
|
1000
|
|
|
|
```
|
|
|
|
(**1 + 1** is the expression)
|
|
|
|
```vb
|
|
|
|
PRINT 1 + 1
|
|
|
|
```
|
|
|
|
```text
|
|
|
|
2
|
|
|
|
```
|
|
|
|
## String Expressions
|
|
|
|
(**"hello!"** is the expression)
|
|
|
|
```vb
|
|
|
|
PRINT "hello!"
|
|
|
|
```
|
|
|
|
```text
|
|
|
|
hello!
|
|
|
|
```
|
|
|
|
(**"Hello" + " " + "there!"** is the expression)
|
|
|
|
```vb
|
|
|
|
PRINT "Hello" + " " + "there!"
|
|
|
|
```
|
|
|
|
```text
|
|
|
|
Hello there!
|
|
|
|
```
|
|
|
|
## See Also
|
|
|
|
* [Argument](Argument)
|