[x] Anda belum terdaftar di forum kami. Klik REGISTER untuk melakukan registrasi. || Atau LOGIN di sini.
IF UNIKOM
Please login or register.

Login with username, password and session length
Advanced search  

News:

The Official Website is http://if.unikom.ac.id

Privacy

Author Topic: [Tanya] Source Delphi 7.0  (Read 3007 times)

0 Members and 1 Guest are viewing this topic.

« on: August 19, 2009, 02:50:18 PM »

baueek

  • TK
  • *
  • Reputation Power: 1
  • baueek belum punya pengaruh.
  • Offline Offline
  • Posts: 17

  • Aktivitas bulan ini
    0%
  • Lokasi: bandung
[Tanya] Source Delphi 7.0
« on: August 19, 2009, 02:50:18 PM »
 :read:
ada yang tau source delphi read/write file ga???
read/write file per byte.
terus kita masukin memo nilai2 byte tadi.
hehe..
 :read:
Logged

«Reply #1 on: August 23, 2009, 03:38:37 PM »

baueek

  • TK
  • *
  • Reputation Power: 1
  • baueek belum punya pengaruh.
  • Offline Offline
  • Posts: 17

  • Aktivitas bulan ini
    0%
  • Lokasi: bandung
Re: [Tanya] Source Delphi 7.0
« Reply #1 on: August 23, 2009, 03:38:37 PM »
akhirnya dapet juga source nya..
hahaha.. :yahoo: :yahoo: :yahoo:

ni source code buat binary file.
Code: delphi
type
 TCustomer = record
   name : string[20];
   age  : Integer;
   male : Boolean;
 end;

var
 myFile   : File of TCustomer;  // A file of customer record
 customer : TCustomer;

begin
 // Try to open the Test.cus binary file for writing to
 AssignFile(myFile, 'Test.cus');
 ReWrite(myFile);

 // Write a couple of customer records to the file
 customer.name := 'Fred Bloggs';
 customer.age  := 21;
 customer.male := true;
 Write(myFile, customer);

 customer.name := 'Jane Turner';
 customer.age  := 45;
 customer.male := false;
 Write(myFile, customer);

 // Close the file
 CloseFile(myFile);

 // Reopen the file in read only mode
 FileMode := fmOpenRead;
 Reset(myFile);

 // Display the file contents
 while not Eof(myFile) do
 begin
   Read(myFile, customer);
   if customer.male
   then ShowMessage('Man with name '+customer.name+
                    ' is '+IntToStr(customer.age))
   else ShowMessage('Lady with name '+customer.name+
                    ' is '+IntToStr(customer.age));
 end;

 // Close the file for the last time
 CloseFile(myFile);
end;

moga aja ada yang butuh.. :yahoo: :yahoo:
Logged

«Reply #2 on: August 23, 2009, 11:15:14 PM »

APTX-7689

  • Kerja Praktek
  • *
  • Reputation Power: 1
  • APTX-7689 belum punya pengaruh.
  • Offline Offline
  • Posts: 21

  • Aktivitas bulan ini
    0%
  • Lokasi: Cisitu Bandung
Re: [Tanya] Source Delphi 7.0
« Reply #2 on: August 23, 2009, 11:15:14 PM »
loh nanya ko jawab sendiri...???  :lol:

tapi gpp deh mas jadi nambah ilmu nih....

sering2 share yah...

butuh pencerahan.... :umnik:
Logged

«Reply #3 on: August 24, 2009, 03:06:13 AM »

baueek

  • TK
  • *
  • Reputation Power: 1
  • baueek belum punya pengaruh.
  • Offline Offline
  • Posts: 17

  • Aktivitas bulan ini
    0%
  • Lokasi: bandung
Re: [Tanya] Source Delphi 7.0
« Reply #3 on: August 24, 2009, 03:06:13 AM »
hehehe :D
waktu itu sih aku nya lom tau..
trus aku udah dapet langsung di share aja sini..
hehe.. :D
Logged

«Reply #4 on: January 23, 2017, 01:54:35 PM »

farenaka

  • TK
  • *
  • Reputation Power: 1
  • farenaka belum punya pengaruh.
  • Offline Offline
  • Posts: 5

  • Aktivitas bulan ini
    0%
  • Lokasi: jakarta
Logged

Pages: [1]
« previous next »
 

Page created in 0.058 seconds with 31 queries.