-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sylvain Maltais
committed
May 8, 2022
1 parent
5398af7
commit b38d86f
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ @author: Sylvain Maltais ([email protected]) | ||
@created: 2022 | ||
@website(https://www.gladir.com/unix-0) | ||
@abstract(Target: Turbo Pascal, Free Pascal) | ||
} | ||
|
||
Program LOGNAME; | ||
|
||
Uses DOS; | ||
|
||
Function StrToLower(S:String):String; | ||
Var | ||
I:Byte; | ||
Begin | ||
For I:=1 to Length(S)do Begin | ||
If S[I] in['A'..'Z']Then S[I]:=Chr(Ord(S[I])+32); | ||
End; | ||
StrToLower:=S; | ||
End; | ||
|
||
BEGIN | ||
If(ParamStr(1)='/?')or(ParamStr(1)='--help')or(ParamStr(1)='-h')or | ||
(ParamStr(1)='/h')or(ParamStr(1)='/H')Then Begin | ||
WriteLn('LOGNAME : Cette commande permet de demander le nom de connection.'); | ||
WriteLn; | ||
WriteLn('Syntaxe : LOGNAME'); | ||
End | ||
Else | ||
Begin | ||
WriteLn(StrToLower(GetEnv('USERNAME'))); | ||
End; | ||
END. |