Suggestion for Import

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Mike Stefanik
User
User
Posts: 53
Joined: Wed May 03, 2006 6:34 am
Location: California, United States
Contact:

Suggestion for Import

Post by Mike Stefanik »

It would be nice that if you use Import and declare a function, that it would also automatically check to see if an "A" (or "W") version exists. For example, if you had an import library with the function FooBarA, then instead of having to do this:

Code: Select all

Import "MyLibrary.lib"
  FooBar.l(strParam1$, dwParam2.l) As "_FooBar@8"
EndImport
You could simply do:

Code: Select all

Import "MyLibrary.lib"
  FooBar.l(strParam1$, dwParam2.l)
EndImport
First it would check for _FooBar@8 and if it didn't find that, then instead of reporting an error, it would next automatically check for _FooBarA@8 (or _FooBarW@8 if Unicode was specified). If neither were found, then return a link error.
Mike Stefanik
sockettools.com