tylanbo
2007-10-17 23:48:09
I was making a database of bitmaps for use with my scripts, and decided to change some redundant code to something more efficient/complicated.
I had done this many times in java, the language I am tought in school, but it doesn't work in pascal. The syntax should be correct…
Anyways, here is what it looks like in my bitmap tester:
Every time it found a Bitmap, I had it store the string of which bitmap it was into the array, and that way when it lists what were found/not found so I know immediately which one was buggy. Simple enough. If no value was put into the array, it is fair to assume it will hold an array length of 0. Here is how it was created:
Found : Array [0..100] of String;
NotFound : Array [0..100] of String;
I can get it to work using a separate variable to count array length, but I shouldn't have to. Please make sure that this method is working correctly.
GetArrayLength didn't work when not given a value, and i'm sick of dealing with it.
I had done this many times in java, the language I am tought in school, but it doesn't work in pascal. The syntax should be correct…
Anyways, here is what it looks like in my bitmap tester:
procedure ListFound;
var
i:Integer;
begin
writeln('Bitmaps that were not found:');
for i:= 0 to GetArrayLength(NotFound) do
begin
if length(NotFound[i]) > 0 then
writeln(NotFound[i]);
end;
writeln('Bitmaps that were found:');
for i:= 0 to GetArrayLength(Found) do
begin
if length(Found[i]) > 0 then
writeln(Found[i]);
end;
end;
Every time it found a Bitmap, I had it store the string of which bitmap it was into the array, and that way when it lists what were found/not found so I know immediately which one was buggy. Simple enough. If no value was put into the array, it is fair to assume it will hold an array length of 0. Here is how it was created:
Found : Array [0..100] of String;
NotFound : Array [0..100] of String;
I can get it to work using a separate variable to count array length, but I shouldn't have to. Please make sure that this method is working correctly.
GetArrayLength didn't work when not given a value, and i'm sick of dealing with it.