|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hello! how could i get something like this working, in turbo pascal it worked, but in delphi it displays access violation error:
While App1 is executed and awaits the readln, execute App2. programm App1; {$APPTYPE CONSOLE} var p:^string; begin new(p); p^:='this string should be displayed'; // now typecast pointer to longint, and display it writeln(inttostr(longint(p))); // now execute second application readln; dispose(p); end; programm App2; {$APPTYPE CONSOLE} var l:longint; p:^string; begin // at this prompt type what the App1 shows: readln(l); p:=pointer(l); writeln(p^); end; |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > Pointers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|