I like a language syntax that is consistent. It makes it easy on both the parser in my PC and the one in my head. Exceptions mean confusion. There are 5 separate points in this append on language syntax, extensibility and consistency.dkinzer wrote:Currently, an alias can only be defined for an external procedure via the Declare statement. I'm not sure what value there would be in allowing an alias for a normal ZBasic procedure.mikep wrote:Can the alias feature be applied to regular ZBasic sub/functions or only those that are declared?
1. Consider the following declarations:
Code: Select all
Public foo as Long
Public bar as Integer Alias foo
Public Declare bar2 as Integer Alias foo2
Public Declare bar3 as Integer Alias "_foo3"
Public Sub fred()
Public Declare Sub bill()
Public Declare Sub jenny Alias "jennifer"()
Public Sub kate Alias katherine()
Code: Select all
Declare Public Sub jenny() Alias "jennifer"
Declare Public Function jenny() As Byte Alias "jennifer"
Code: Select all
Public Declare Const frequency
Public Declare Const frequency2 Alias "_CPU"
Code: Select all
Dim bar as Long
Public Dim bar2 as Integer Alias bar
Public Declare Dim bar3 as Integer Alias foo3
Public Declare Dim bar4 as Integer Alias "_foo4"
Code: Select all
<Usage(Used, Inline)> Public Declare Sub bill()
Code: Select all
<External("foo3")> Public Sub jenny()