The VBA documentation defines the following token:
special-form = “Array“ / “Circle” / “Input” / “InputB” / “LBound” / “Scale” / “UBound”
According to the documemtation:
A special-form is a reserved-identifier that is used in an expression as if it was a program defined procedure name but which has special syntactic rules for its argument.
But there is no mention of the purpose of these keywords, nor there number, type of parameters and return values.
Some are documented in other places:
My question is:
What is the purpose of Circle and Scale and how are they used ?
I found the correct (odd) syntax of Circle which is the same as the BASIC statement
CIRCLE(xcenter, ycenter), radius[,[color][,[start],[end][,aspect]]]
and gives no syntax error (I didn't find any mention of Scale though it doesn't seem to have any parameters) but I can't assign it to a variable, and if I try to run the code below (which is syntaxically correct) I get the following error:
Method not valid without suitable object
code:
Sub test1()
Circle (5, 5), 10
End Sub
Sub test2()
Scale
End Sub
VB inherited the odd syntax of graphics methods (what circle/scale are) from QBASIC and VBA further inherited them from VB (upon which it is based). Presumably it was decided that rather than removing the special parsing rules for these constructs in the runtime, it was simpler to leave them as a noop.
CREDIT TO Alex K. (see his comment)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With