PicoMite V6.00.02 release candidates - all versions


Author Message
AlbertR
Senior Member

Joined: 29/05/2025
Location: Germany
Posts: 106
Posted: 07:28am 07 Jun 2025      

there should also be a different if the "AS INTEGER" is used


Option EXPLICIT
Dim integer a
a = 2
Print "a at start "a
test1
Print "test without par:"a
a = 2
test1(a)
Print "test1: "a
a = 2
test2(a)
Print "test2: "a
a = 2
test3(a)
Print "test3: "a
a = 2
test4(a)
Print "test4: "a
a = 2
test5(a)
Print "test5: "a
a = 2
test6(a)
Print "test6: "a
'------------------------------------
Sub test1( b )
If b = 2 Then b = 23
End Sub

Sub test2( b As integer )
If b = 2 Then b = 23
End Sub

Sub test3(byval b )
If b = 2 Then b = 23
End Sub

Sub test4(byval b As integer)
If b = 2 Then b = 23
End Sub

Sub test5(byref b As integer)
If b = 2 Then b = 23
End Sub

Sub test6(byref b )
If b = 2 Then b = 23
End Sub

>RUN
a at start  2
test without par: 2
test1:  2
test2:  23
test3:  2
test4:  2
test5:  23
[23] test6(a)
Error : BYREF requires same types: a