Import "Alias"

Previous topic - Next topic

bigsofty

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
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Slydog

#1
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

My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

bigsofty

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
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

ok, will see.

bigsofty

Thanks Gernot, this would be very handy for me if it comes to pass.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

bigsofty

Any update on this Gernot?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)