You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Program Foo;
Function MyFunction(I:Integer):ShortString;
Begin
MyFunction := 'hi there';
End;
Var
MyString : ShortString;
Begin
MyString := MyFunction(2);
MyString[0] := #2;
WriteLn(MyString);
End.
When you return a ShortString ... who free's the memory for it? Or is it static? or something else?
http://stackoverflow.com/questions/20177412/long-strings-in-pascal
The text was updated successfully, but these errors were encountered: