My current program requires that I write a Pascal module. I'm having trouble
debugging it. I'm using BCB4. I can run the program, and set the breakpoint
okay. When I do View|Debug|LocalVariables it displays a correct list of
local variables.
But it appears not to have type information for any of them. The local
variable window shows them as, say, 'iv: :0012F614' even though iv is an
integer; and 'sv: :0012F620' even though sv is a String. Also, when I try to
inspect any local variable, the inspector claims that its type is 'void'.
I went to Project|Options|Pascal and turned on all the debugging options.
Also turned all debugging things on in Project|Options|Linker and
|Options|Compiler. No difference.
So: how can I inspect local variables in my Pascal module?
------
the program consists of ptest.cpp, utest.cpp, utest.h, utest.dfm, and
resscan.pas. The function I'm debugging is in resscan.pas and looks like
this:
procedure VersionStampFromString(s:String; var vs: TVersionStamp);
var
sd, st, sv: String;
id, it, iv: Integer;
temp:Integer;
begin
id := Pos('day=',s);
it := Pos('time=',s);
iv := Pos('ver=',s);
sd := Copy(s,id+5,it-id-3);
st := Copy(s,it+6,iv-it-3);
sv := Copy(s,iv+5,Length(s)-iv-1);
decomp(sd,vs.day,vs.month,vs.year,temp);
decomp(st,vs.hour,vs.minute,vs.second,temp);
decomp(sv,vs.a,vs.b,vs.c,vs.d);
end;
--
Lucian