furmiga
asked on
Loading - reading - Showing ( memory )
Heya guyz... very easy... well not to me :P
I created a .txt with the number 5 inside... close it...
1 - I want to load the .txt file and save it into a MemoryStream
2 - Read this memory and, since its a number, save the value into a var ( integer type )
3 - use the integer var like showmessage(inttostr(intva r+5));
4 - get my 10 :P
5 - release the memory
ty in advance
I created a .txt with the number 5 inside... close it...
1 - I want to load the .txt file and save it into a MemoryStream
2 - Read this memory and, since its a number, save the value into a var ( integer type )
3 - use the integer var like showmessage(inttostr(intva
4 - get my 10 :P
5 - release the memory
ty in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Heyz man.. tx a lot :)
IntVar: Integer;
F: TStringList;
begin
F := TStringList.Create;
try
F.LoadFromFile('myfile.txt
IntVar := StrToInt(F[0]); // First Line
ShowMessage(IntToStr(IntVa
finally
F.Free;
end;
end;