home *** CD-ROM | disk | FTP | other *** search
- {Worm}
- {Lowest level routines.}
- Unit Worm;
-
- Interface
-
- Type
-
- Direction=(Up,Left,Down,Right);
-
- Const
-
- {Regular key definitions.}
- Esc=#27;
- Return=#13;
- Tab=^I;
- BackSpace=^H;
- {Extended key definitions.}
- ShiftTab=#15;
- AltV=#47;
- AltT=#20;
- Home=#71;
- UpArrow=#72;
- PgUp=#73;
- LeftArrow=#75;
- RightArrow=#77;
- EndKey=#79;
- DownArrow=#80;
- PgDn=#81;
- Ins=#82;
- Del=#83;
- CntlHome=#119;
-
- Procedure Noise;
- Function TodayDate:String;
- {********************}
- Implementation
-
- Uses CRT,DOS;
-
- {--------------------}
- {Noise}
- {Makes the worst possible noise.}
- Procedure Noise;
-
- BEGIN
-
- Sound(220);
- Delay(50);
- NoSound;
-
- END;
- {--------------------}
- {TodayDate}
- {Returns a string that describes the current date in a format similar to that
- of 'May 17, 1991'. This is always a 12 character string.}
- Function TodayDate:String;
-
- Const
-
- MonthStr:Array[1..12] of String[3]=('Jan','Feb','Mar','Apr','May',
- 'Jun','Jul','Aug','Sep','Oct','Nov','Dec');
-
- Var
-
- Year :Word;
- Month :Word;
- Day :Word;
- DayOWeek:Word;
- DayStr :String;
- YearStr :String;
-
- BEGIN
-
- GetDate(Year,Month,Day,DayOWeek);
- Str(Day:2,DayStr);
- Str(Year,YearStr);
- TodayDate:=Concat(MonthStr[Month],' ',DayStr,', ',YearStr);
-
- END;
-
- eND.