File tree Expand file tree Collapse file tree 8 files changed +73
-5
lines changed Expand file tree Collapse file tree 8 files changed +73
-5
lines changed Original file line number Diff line number Diff line change 1+ '' examples/manual/casting/boolean.bas
2+ ''
3+ '' NOTICE: This file is part of the FreeBASIC Compiler package and can't
4+ '' be included in other distributions without authorization.
5+ ''
6+ '' See Also: http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgCbool
7+ '' --------
8+
9+ ' Using the CBOOL function to convert a numeric value
10+
11+ 'Create an BOOLEAN variable
12+ Dim b As BOOLEAN
13+
14+ 'Convert a numeric value
15+ b = CBOOL(1 )
16+
17+ 'Print the result, should return True
18+ Print b
19+ Sleep
Original file line number Diff line number Diff line change 1+ '' examples/manual/datatype/boolean-false.bas
2+ ''
3+ '' NOTICE: This file is part of the FreeBASIC Compiler package and can't
4+ '' be included in other distributions without authorization.
5+ ''
6+ '' See Also: http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgFalse
7+ '' --------
8+
9+ Dim b As Boolean = False
10+ If b Then
11+ Print "b is True"
12+ Else
13+ Print "b is False"
14+ End If
Original file line number Diff line number Diff line change 1+ '' examples/manual/datatype/boolean-true.bas
2+ ''
3+ '' NOTICE: This file is part of the FreeBASIC Compiler package and can't
4+ '' be included in other distributions without authorization.
5+ ''
6+ '' See Also: http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgTrue
7+ '' --------
8+
9+ Dim b As Boolean = True
10+ If b Then
11+ Print "b is True"
12+ Else
13+ Print "b is False"
14+ End If
Original file line number Diff line number Diff line change 1+ ' ' examples/manual/datatype/boolean.bas
2+ ' '
3+ ' ' NOTICE: This file is part of the FreeBASIC Compiler package and can't
4+ ' ' be included in other distributions without authorization.
5+ ' '
6+ ' ' See Also: http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgBoolean
7+ ' ' --------
8+
9+ Dim boolvar As Boolean
10+ boolvar = True
11+ Print " boolvar = " , boolvar
Original file line number Diff line number Diff line change 2222
2323'' Draw a pattern on the image by directly manipulating pixel memory.
2424For y As Integer = 0 To 63
25- Dim row As UInteger Ptr = pixels + y * pitch
25+ Dim row As ulong Ptr = pixels + y * pitch
2626
2727 For x As Integer = 0 To 63
2828 row[x] = RGB(x * 4 , y * 4 , (x Xor y) * 4 )
Original file line number Diff line number Diff line change @@ -35,16 +35,16 @@ ScreenLock()
3535 For y As Integer = 0 To h - 1
3636
3737 '' Set pixel address to the start of the row
38- '' It's a 32-bit pixel, so use a UInteger Ptr
39- Dim As UInteger Ptr pixel = row
38+ '' It's a 32-bit pixel, so use a ULong Ptr
39+ Dim As ULong Ptr pixel = row
4040
4141 For x As Integer = 0 To w - 1
4242
4343 '' Set the pixel value
4444 *pixel = RGB(x, x Xor y, y)
4545
4646 '' Get the next pixel address
47- '' (UInteger Ptr will increment by 4 bytes)
47+ '' (ULong Ptr will increment by 4 bytes)
4848 pixel += 1
4949
5050 Next x
Original file line number Diff line number Diff line change 66'' See Also: http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgOpNotEqual
77'' --------
88
9- If (69 <> 420 ) Then Print "(420 <> 420) is true."
9+ If (69 <> 420 ) Then Print "(69 <> 420) is true."
1010 If Not (69 = 420 ) Then Print "not (69 = 420) is true."
Original file line number Diff line number Diff line change 1+ '' examples/manual/proguide/literals/boolean.bas
2+ ''
3+ '' NOTICE: This file is part of the FreeBASIC Compiler package and can't
4+ '' be included in other distributions without authorization.
5+ ''
6+ '' See Also: http://www.freebasic.net/wiki/wikka.php?wakka=ProPgLiterals
7+ '' --------
8+
9+ Dim a As Boolean = False
10+ Dim b As Boolean = True
You can’t perform that action at this time.
0 commit comments