Need help porting function to Free Pascal 
Author Message
 Need help porting function to Free Pascal

Jeff Patterson skrev i meddelandet ...

Quote:

>How can I get this function I wrote in TP7 to work in Free Pascal?    I
>know that the Mem[] is referencing Real-Mode memory, but i want it to
>reference the variable I am trying to reference with Seg(),Ofs() (which
>of course don't work with FPC).

See if you can follow this: (I changed quite a lot...)

function Stz(var Start; max:Byte):String;
var S : String;
    SLen : Byte Absolute S;
    St : Array[Byte] of Char Absolute Start;   {-- Here's the magic! --}
begin
  If Max = 0 then Max := 1;
  SLen:=0;
  while (SLen<Max) and not (St [SLen] in [#0,#26]) do Begin
      S [ Succ(SLen) ] := St [SLen];
      Inc(SLen);
  End;
  Stz := S;
end;

--
/GreenGhost
________________________
Kill the spammer to mail me



Thu, 19 Jul 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Need help porting function to Free Pascal

2. Need help porting ancient MS-DOS Pascal program to Linux

3. Need help from "Free Pascal" users

4. free idsoftware front-end program in pascal--need help - idgames.pas [1/1]

5. free idsoftware front-end program in pascal--need help - idgames.pas [1/1]

6. free pascal and serial ports under linux

7. Converting Pascal PORT function to C++

8. Need help with recursive functions in Turbo Pascal 7.0

9. Need help with a pascal function

10. Help With Pascal Iwant to call C function from Pascal

11. Need help with getting data from parallel port

 

 
Powered by phpBB® Forum Software