*buffer{#BYTES}

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
MLK
User
User
Posts: 57
Joined: Sat Jan 24, 2004 8:46 pm
Location: Germany

*buffer{#BYTES}

Post by MLK »

*buffer{...} instead of AllocateMemory(...) - just like string${...} instead of Space(...)

Code: Select all

ApiCall_(*buffer{1024})
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Re: *buffer{#BYTES}

Post by Kale »

MLK wrote:*buffer{...} instead of AllocateMemory(...) - just like string${...} instead of Space(...)

Code: Select all

ApiCall_(*buffer{1024})
That looks horrible. Not really Pure.
--Kale

Image
MLK
User
User
Posts: 57
Joined: Sat Jan 24, 2004 8:46 pm
Location: Germany

Post by MLK »

so you shouldnt like..

Code: Select all

GetTempPath_(255, @TempPath${255})
..too - but sorry, its already pure :wink:
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

i must admit this is handy :

Code: Select all

If GetTempPath_(#MAX_PATH, @result.s{#MAX_PATH})
  Debug result
EndIf
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Post Reply