Adds ability to add a single statement to beginning of file or function, and every usage of m in that or lower scopes will be typecast as the type given.
Syntax:
typecast m as <type>
eg:
import "types.bs"
typecast m as Thing1
sub func1()
x = m.value ' x is type of Thing1.value
print x
end sub
sub func2()
typecast m as Thing2
x = m.value ' x is type of Thing2.value
print x
end sub
sub func3()
aa = {
innerFunc: sub()
typecast m as Thing3
x = m.value ' x is type of Thing3.value
print x
end sub
}
end sub
class TestKlass
value as string
sub method1()
x = m.value ' x is type of TestKlass.value
print x
end sub
sub method2()
typecast m as Thing1
x = m.value ' x is type of Thing1.value
print x
end sub
end class
Adds ability to add a single statement to beginning of file or function, and every usage of
m
in that or lower scopes will be typecast as the type given.Syntax:
eg: