help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'System' (#rtl)

MoveChar0

Move data till first zero character

Declaration

Source position: systemh.inc line 426

procedure MoveChar0(

  const buf1;

  var buf2;

  len: SizeInt

);

Description

MoveChar0 moves Count bytes from Src to Dest, and stops moving if a zero character is found.

Errors

No checking is done to see if Count stays within the memory allocated to the process.

See also

Move

  

Move data from one location in memory to another

Example

Program Example109;

{ Program to demonstrate the MoveChar0 function. }

Var
  Buf1,Buf2 : Array[1..80] of char;
  I : longint;

begin
  Randomize;
  For I:=low(buf1) to high(buf1) do
    Buf1[i]:=chr(Random(16)+Ord('A'));
  Writeln('Original buffer');
  writeln(Buf1);
  Buf1[Random(80)+1]:=#0;
  MoveChar0(Buf1,Buf2,80);
  Writeln('Randomly zero-terminated Buffer');
  Writeln(Buf2);
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505