PicoMite V6.00.02 release candidates - all versions
Author
Message
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 601
Posted: 02:37am 07 Jun 2025
You're not using a as a parameter when you call test. Change test to test a. If a isn't a parameter, it's global unless you define it as local in the sub.
> LIST ' Test prog 1 Dim integer a=5 Print "a =";a test a
Sub test(BYVAL a As integer) If a = 5 Then a = 10 Print "In Sub a =";a EndIf End Sub
Print "After Sub a =";a End > > > RUN a = 5 In Sub a = 10 After Sub a = 5 >