Skip to content

Commit 1e99fab

Browse files
committed
fbdocs: update examples/manual from wiki
1 parent 5ffd463 commit 1e99fab

22 files changed

+171
-10
lines changed

examples/manual/gfx/cls-memset.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
'' --------
88

99
Dim scrbuf As Byte Ptr, scrsize As Integer
10-
Dim As Integer scrhei, scrpitch
10+
Dim As Long scrhei, scrpitch
1111
Dim As Integer r = 0, dr = 1
1212

1313
ScreenRes 640, 480, 8

examples/manual/gfx/imageconvertrow.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Sleep
4848

4949
'' copy the image data into a 32-bit image
5050
Dim As Byte Ptr p8, p32
51-
Dim As Integer pitch8, pitch32
51+
Dim As Long pitch8, pitch32
5252

5353
#ifndef ImageInfo '' older versions of FB don't have the ImageInfo feature
5454
#define GETPITCH(img_) IIf(img_->Type=PUT_HEADER_NEW,img_->pitch,img_->old.width*img_->old.bpp)

examples/manual/gfx/imageinfo.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ScreenRes 320, 200, 32
1111
Dim image As Any Ptr = ImageCreate( 64, 64 )
1212

13-
Dim pitch As Integer
13+
Dim pitch As Long
1414
Dim pixels As Any Ptr
1515

1616
'' Get enough information to iterate through the pixel data.

examples/manual/gfx/screenptr.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ScreenLock()
3333
Dim As UByte Ptr pixel = buffer + (y * pitch) + (x * bypp)
3434

3535

36-
'' Set the pixel color to 10 (light green).
36+
'' Set the center pixel color to 10 (light green).
3737
*pixel = 10
3838

3939
'' Unlock the screen.

examples/manual/math/randomize.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ Randomize , 1
1313
For i As Integer = 1 To 10
1414
Print Rnd
1515
Next
16+

examples/manual/memory/callocate.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ Next
2121

2222
' Free the memory.
2323
Deallocate(p)
24+

examples/manual/memory/deallocate.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ End Sub
1919

2020
DeallocateExample1()
2121
End 0
22+

examples/manual/memory/deallocate2.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ End Sub
2727

2828
DeallocateExample2()
2929
End 0
30+

examples/manual/memory/deallocate3.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ End Sub
2828

2929
DeallocateExample3()
3030
End 0
31+

examples/manual/memory/reallocate.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ Else '' Reallocate failed, memory unchanged
4343
End If
4444

4545
Deallocate a ' Clean up
46+

0 commit comments

Comments
 (0)