Forum > Debugger

How to use a input file?

(1/1)

NeoLee:
The program I built needs a input file. But I do not know how to set the options in the IDE.
  Is it in the Evironment options or Debugging options ?
  And where to download a Chinese language pack?
 Thank you!

matthijs:
Go to Run -> Run Parameters.
In the inputbox "Commandline parameters" enter the name of the file with complete path.
Press OK
Press Run.
To make use of the parameter use ParamStr(1), as ParamStr(0) is the application exename.

CCJ:
I don't quite understand you.  Then how to use "ParamStr(1)" as an input file?  Could you give me some expamles?

matthijs:
You could do something like this:

--- Code: ---
  AssignFile(F, ParamStr(1));
  Reset(F);
  // Do your stuff
  CloseFile(F);

--- End code ---

Marc:

--- Quote from: "NeoLee" ---The program I built needs a input file. But I do not know how to set the options in the IDE.
  Is it in the Evironment options or Debugging options ?
  And where to download a Chinese language pack?
 Thank you!
--- End quote ---


When you run your app from a cmdline, how would you give it the inputfile ?

Navigation

[0] Message Index

Go to full version