u could have arrays to make it neater.. which u probally dont know how to do.. but to confuse u more.. i made a sample project
SCAR Code:
program Test;
const
MonsterName = 'Hill Giant';
var
i : integer;
MonsterNames : Array Of String;
MonsterColors1, MonsterColors2, MonsterColors3 : Array Of Integer;
MonsterBones : Array Of Boolean;
MonsterColor1, MonsterColor2, MonsterColor3 : Integer;
RealMonster, BigBones : Boolean;
begin
MonsterNames := ['Cow', 'Goblin', 'Hill Giant'];
MonsterColors1 := [1234, 23432, 3];
MonsterColors2 := [345834, 12321, 34];
MonsterColors3 := [12312, 2343, 54];
MonsterBones := [False, False, True];
for i := 0 to 2 do
begin
if MonsterNames[i] = MonsterName then
begin
MonsterColor1 := MonsterColors1[i];
MonsterColor2 := MonsterColors2[i];
MonsterColor3 := MonsterColors3[i];
BigBones := MonsterBones[i];
RealMonster := True;
end;
end;
//Just to see if it works
if RealMonster then
begin
Writeln('MonsterName := ' + MonsterName + ';');
Writeln('MonsterColor1 := ' + Inttostr(MonsterColor1) + ';');
Writeln('MonsterColor2 := ' + Inttostr(MonsterColor2) + ';');
Writeln('MonsterColor3 := ' + Inttostr(MonsterColor3) + ';');
if BigBones then
Writeln('MonsterBones := True;')
else
Writeln('MonsterBones := False;');
end else
begin
Writeln('Incorrect MonserName!!!');
Writeln('Valid Arguments Are: Cow, Goblin, Hill Giant!');
end;
end.