Hi, I'm a at a very beginner level in Pascal and am learning it for my A-levels
We're learning how to save, add, search records for a database console. I managed to do all of them, but I am having trouble with deleting records. In my procedure below, I'm trying to initialise the records to null. Is there a specific way to express that or is that a complicated process in Pascal. Also can you tell me a simpler way
procedure Delete;
var
DeleteInput:string;
Count:integer;
Found: boolean;
begin
write('Enter the surname of the Pupil: ');
readln(DeleteInput);
Found:=false;
for Count:=1 to LastRecord do
begin
if Pupils[Count].surname = DeleteInput then
begin
found:=true;
Pupils[Count]. Surname ='' ;
Pupils[Count]. Age ='' ;
dec(LastRecord);
end;
end;
if found= false then
begin
writeln('Record not found for that surname');
end;
end;