Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2000-12

chdir problem?

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Um, I must be missing something real obvious because this makes no sense... does chdir have a problem when compiling win32 targets? I know, sounds dumb but it doesn't _seem_ to be working. Try compiling this:

Program CDir;
var
  Answer : string;
BEGIN
  writeln;
  write ('Change to dir?: ');
  readln (Answer);
  if Answer = '' then exit;
  {$I-}
    chdir (Answer);
  {$I+}
  if ioresult  0 then writeln ('Error changing to ',Answer);
END.

go32 targets work fine, but win32's don't change the directory (and it doesn't give any errors either). I must be missing something but for the life of me I can't figure it out. Can anyone else?

TIA,
Jim

Reply by email