home *** CD-ROM | disk | FTP | other *** search
- {$R-,S-,I-,D-,V-,B-,N-,L- }
- {$O+}
-
- (*******
- *
- * You may put your own Forum-PC command in this module. It will be "J" from
- * the main menu.
- *
- * Here is a short example which illustrates how to use some of the Forum-PC
- * Procedures:
- *
- * Procedure mycommand;
- * VAR n,try,guess:integer;
- * begin
- * repeat
- * writehdr ('Guess the Number'); { Write header }
- * n:=random(100)+1; { Generate number 1 to 100 }
- * try:=0;
- * repeat
- * try:=try+1;
- * write ('Try #',try,': '); { Write/Writeln send to the modem }
- * getstr;
- * guess:=valu(input); { VALU converts string to number }
- * if guess<n
- * then writestr ('Too small! Try a higher number!')
- * else if guess>n
- * then writestr ('Too big! Try a lower number!')
- * until guess=n;
- * writestr ('');
- * writeln ('You got it in ',try,' tries!');
- * writestr ('Play again? *'); { * means wait for input }
- * until not yes { YES tests input for Yes or No }
- * end;
- *
- * Note: WRITESTR always writes a string to the modem, regardless if the person
- * had just pressed space. If the person presses space, WRITELN's will
- * be ignored until a WRITESTR is called.
- *
- * In addition, the following special characters are interpreted by
- * WRITESTR (when they appear at the end of the string):
- *
- * Char Example Explanation
- *
- * * Yes or no? * Get input, allow chaining
- * & Your name? & Get input, no chaining; accept commas
- * : Two plus two is: Print the colon and get input
- *
- * If this is thoroughly baffling, I suggest you study Pascal before attempting
- * to add your own command(s)!
- *
- *******)
-
- unit mycomman;
-
-
- {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
-
- interface
-
- uses crt,dos,
- gentypes,configrt,modem,statret,gensubs,subs1,windows,subs2,textret,
- mailret,userret,flags,mainr1,ansiedit,lineedit,chatstuf,
- mainr2,overret1; { that's everything! }
-
- {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
-
-
- Procedure mycommand;
-
-
- {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
-
- implementation
-
- {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
-
-
- Procedure mycommand;
- begin
- { Place your code here. This code will get executed when the user hits "J"
- from the main menu. }
-
- end;
-
- {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
-
- {initialization}
-
- {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
-
-
- begin
- { You can put initialization code here. This code will be run BEFORE
- Forum-PC even starts waiting for calls! }
- end.