PFE produces the error "Substitution cannot be performed in the specified command line as either no file is currently open, or the current window does not contain a named file"
This can be caused by the same two problems as those that cause the same error during Compiling
You try running your program (with the Run button, ) and you get "Unable to create process: [2] The system cannot find the file specified."
You must successfully compile your code before you can run it otherwise you will have no executable to run.
You try running your program (with the Run button, ) and you get "Unable to create process: [193] %1 is not a valid Windows NT application.
You have probably changed the Command to run
from %n.exe
to something like
assess1.c
This will not work as you do not actually run the assess1.c gcc
compiles it into an executable called assess1.exe and you need
to run that. Either by putting back %n.exe
or
by running assess1.exe
or even just
assess1
You try running your program from the DOS prompt by typing
something like assess1.c
and you get the error
"This file does not have a program associated with it for
performing this action. Create an association in My Computer
by clicking View and then clicking Options."
you do not actually run the assess1.c gcc
compiles it into an executable called assess1.exe and you need
to run that. So just type assess1
On running your program the DOS window closes before you get a chance to read the output.
The DOS window attached to the run command for PFE is configured
to close when your program exits, and your program will exit
when it gets to the end of the main function. The best way to
get round this is to start up a separate DOS window (with the
DOS icon on PFE) and run your code manually, by
making sure you are on the Z drive (if you are not type
z:
and press <RETURN>) and if your code were
called assess1.c then you would run it by typing
assess1
After running your code and it asks you for some input (if you
put something like printf("Enter Values\n");
in
your code) you type some input and your program does not seem to
respond.
It is quite possible that this is due to problems with scanf. If
you put any trailing spaces in the format string of scanf, for
example:-
scanf("%d %d %d ",&f[0],&f[1],&f[2]); ^The the program will be waiting for that space before the scanf function returns. To fix this simply remove the trailing space.