FillMemory() float and double flags

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

FillMemory() float and double flags

Post by Psychophanta »

Please add #PB_Float and #PB_Double for FillMemory() function.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: FillMemory() float and double flags

Post by idle »

+1

in mean time you can do this

Code: Select all

Procedure FillMemoryFloat(*mem,size,val.f) 
 Protected *p.long = @val  
 FillMemory(*mem,size,*p\l,#PB_Long) 
EndProcedure 

Dim ar.f(10) 

FillMemoryFloat(@ar(0),10*4,#PI) 

For a = 0 To 9 
  Debug ar(a) 
Next   
Windows 11, Manjaro, Raspberry Pi OS
Image
Post Reply