procedure MkDir (Directory: String);
MkDir creates the given Directory, if its argument is a valid parameter to the related operating system's function. Otherwise a runtime error is caused.
MkDir is a Borland Pascal extension.
program MkDirDemo; var Foo: String (127); begin WriteLn ('Enter directory name to create:'); ReadLn (Foo); {$I-} { Don't abort program on error } MkDir (Foo); if IOResult <> 0 then WriteLn ('Directory `', Foo, ''' could not be created') else WriteLn ('Okay') end.