home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
PROGRAM
/
APR94_1.ZIP
/
ALLEY.ZIP
/
COMMON.PAS
next >
Wrap
Pascal/Delphi Source File
|
1994-01-04
|
2KB
|
64 lines
(* ----------------------------------------------------------- *(
** common.pas -- Various constants, types, and subroutines **
** ----------------------------------------------------------- **
** **
** **
** ----------------------------------------------------------- **
** Copyright (c) 1994 by Tom Swan. All rights reserved. **
)* ----------------------------------------------------------- *)
unit Common;
INTERFACE
const
identStrLen = 64;
digitSet = ['0' .. '9'];
upperSet = ['A' .. 'Z'];
lowerSet = ['a' .. 'z'];
alphaSet = upperSet + lowerSet;
identSet = alphaSet + digitSet + ['_'];
type
IdentStr = String[identStrLen];
{ Return lowercase equivalent of Ch }
function DnCase(Ch: Char): Char;
{ Convert all letters in identifier to lowercase }
procedure DownCase(var Ident: IdentStr);
IMPLEMENTATION
{ Return lowercase equivalent of Ch }
function DnCase(Ch: Char): Char;
begin
if Ch in upperSet
then Ch := Chr(Ord(Ch) + 32);
DnCase := Ch
end;
{ Convert all letters in identifier to lowercase }
procedure DownCase(var Ident: IdentStr);
var
I: Integer;
begin
if Length(Ident) > 0 then
for I := 1 to Length(Ident) do
Ident[I] := DnCase(Ident[I])
end;
begin
end.
(*
// --------------------------------------------------------------
// Copyright (c) 1993 by Tom Swan. All rights reserved
// Revision 1.00 Date: 01/04/1994 Time: 09:38 am
*)