Table of Content
HAL Forum
function longint GetRecordFromArea (
var record AnyRecord,string RecordType,longint StartPos,area RawData)
Description:
Retrieves specified type of record from a designated part of the memory area. The function return value is the retrieved record memory footprint size in bytes.
Parameters:
AnyRecord Record variable that receives the data from the area
RecordType The type of record to receive from the area
StartPos Starting position of data extraction - in bytes. (starting from 0)
RawData The area variable that holds the raw data from where the record is being extracted.
// Load DEMO data before testing this
// This will run right after HansaWorld has been started
global
updating procedure OnApplicationStartup()
begin
  area a;
  longint l;
  record INVc INr;

  SetCompany(1,true);
  while(LoopMain(INr,1,true)) begin
    AddRecordToArea(INr,"INVc",a);
  end;

  // writes all the record codes in the area to hansa.log
  while(l<GetAreaLength(a)) begin
    l = GetRecordFromArea(INr,"INVc",l,a);
    LogText(0,INr.Code);
  end;
  
  return;
end;
Related topics:
««