[Implemented] ReadString() length parameter

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

[Implemented] ReadString() length parameter

Post by Trond »

It would be great with a ReadString() function that returned x characters as a string, that would work similar to this:

Code: Select all

Memory = AllocateMemory(Length)
ReadData(File, Memory, Length)
String.s = PeekS(Memory, Length)
FreeMemory(Memory)
Instead it could be like this:

Code: Select all

String.s = ReadStringX(File, Length)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: ReadString() length parameter

Post by PB »

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply