GLBasic forum

Feature request => IDE/Syntax => Topic started by: bigsofty on 2011-Jun-17

Title: Import "Alias"
Post by: bigsofty on 2011-Jun-17
Is there a chance of adding ALIAS "foo" to the IMPORT command to avoid functions that have already been imported that have the same name? Kinda like a rename ability for imported functions, if you get my meaning.

Also dome of the function names in external libs kind of suck, it would be nice to be able to change then to something more readable.  :S
Title: Re: Import "Alias"
Post by: Slydog on 2011-Jun-17
That would be a good idea.
Visual Basic 6.0 does that, using this syntax:  (is that where you got the 'alias' keyword!?)

Code (glbasic) Select
Public Declare Function FontCreate Lib "gdi32" Alias "CreateFontA" _
    (ByVal h As Long, ByVal W As Long, ByVal PAF As Long, ByVal F As String) As Long

Title: Re: Import "Alias"
Post by: bigsofty on 2011-Jun-18
I think a few use it, Freebasic comes to mind at the moment though...

Code (glbasic) Select
Declare Function MyFunction cdecl Alias "FooFunction" () As Integer
Title: Re: Import "Alias"
Post by: Kitty Hello on 2011-Jun-20
ok, will see.
Title: Re: Import "Alias"
Post by: bigsofty on 2011-Jun-20
Thanks Gernot, this would be very handy for me if it comes to pass.
Title: Re: Import "Alias"
Post by: bigsofty on 2011-Dec-06
Any update on this Gernot?