home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
pc
/
opus
/
opin103d.lzh
/
D_NODEL.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-12-03
|
3KB
|
89 lines
Program DemoNodelist;
{***************************************************************************}
{* *}
{* O p u s I n t e r f a c e V e r 1.03 Demo Program. *}
{* *}
{* Opus V 1.0x Interface for Turbo Pascal Ver 4.0, 5.0 and 5.5 *}
{* *}
{* These Structures,Procedures and Functions may help you to make OPUS *}
{* utilities for to help other SysOps, Please read the Documentation. *}
{* *}
{* Regards *}
{* Per Holm *}
{* *}
{* FIDO: Per Holm - Asgaard BBS 2:230/22.0 *}
{* UUCP: perholm@daimi.DK *}
{* *}
{***************************************************************************}
{***************************************************************************}
{* *}
{* Demo of the nodelist related routines... *}
{* *}
{***************************************************************************}
Uses
OpInt;
PROCEDURE ChkError;
VAR
Err: Integer;
BEGIN
Err:=OpIntERROR;
IF Err>0 THEN
BEGIN
Writeln('You Got Yourself an Error ',Err,' During OpInt Access');
Readln;
END;
END;
PROCEDURE ChkNode5;
VAR
l: LongInt;
N:_Node;
BEGIN
l:=FindNode('Nodelist.Idx',230,22); { Find last entry for node 230/22 }
ChkError;
ReadNode('Nodelist.Sys',N,l); { Read the information }
ChkError;
Writeln('BoardName .... : ',N.Name);
Writeln('Phone ........ : ',N.Phone);
Writeln('Password ..... : ',N.Password);
N.Password:='YOYO'; { Change the password }
WriteNode('Nodelist.Sys',N,l); { Update the nodelist }
ChkError;
END;
PROCEDURE ChkNode6;
VAR
l: LongInt;
N:_NewNode;
BEGIN
l:=NumberOfNodes('Nodelist.Idx'); { Get the numbers of nodes in the NL}
ChkError;
ReadNewNode('Nodelist.Dat',N,l); { Read the last record in the NL }
ChkError;
Writeln('BoardName .... : ',N.Name);
Writeln('Phone ........ : ',N.Phone);
Writeln('Password ..... : ',N.Password);
N.Password:='NONO';
N.Number:=9999;
WriteNewNode('Nodelist.sys',N,l+1); { Add a new record to the nodelist }
ChkError;
END;
BEGIN
ChkNode5;
ReadLn;
ChkNode6;
readln;
END.