October 29, 2025, 10:20:46 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Not compiling

Started by oneplace, May 22, 2008, 08:59:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oneplace

Here is a sample file:
I am have a problem just getting this file to write to a file. I get this when I try to compile the file.
"No input files specified"

and it does not open the file or compile it.

OPENCONSOLE
DEF myfile as FILE
DEF one as STRING
one = "hello"
IF OPENFILE(myfile, "C:\\clock\\my.txt", "W") = 0
    WRITE myfile, one
    CLOSEFILE myfile
ENDIF

PRINT "Press Any Key To Close"
DO:UNTIL INKEY$ <> ""
CLOSECONSOLE
END

billhsln

May 22, 2008, 09:16:34 PM #1 Last Edit: May 22, 2008, 09:19:46 PM by billhsln
Could it be because the C:\CLOCK directory does not exists????

Try:

OPENCONSOLE
DEF myfile as FILE
DEF one as STRING
one = "hello"
IF OPENFILE(myfile, "C:\\clock\\my.txt", "W") = 0
    PRINT "OPENED"
    WRITE myfile, one
    CLOSEFILE myfile
ELSE
    PRINT "PROBLEMS OPENING FILE"
ENDIF

PRINT "Press Any Key To Close"
DO:UNTIL INKEY$ <> ""
CLOSECONSOLE
END


Bill
When all else fails, get a bigger hammer.

oneplace

I found what the problem was:
I am running vista and I had the user account control set to "on"
Once I shut it off it works fine.

Thank you

pistol350

Quote from: oneplace on May 22, 2008, 09:36:08 PM
I found what the problem was:
I am running vista and I had the user account control set to "on"
Once I shut it off it works fine.

Thank you

I don't use Vista, but i am not sure about the solution you mentioned,
so try this code :

OPENCONSOLE
DEF myfile as FILE
DEF one as STRING
DEF myDirectory as STRING
one = "hello"
myDirectory = "C:\\clock"

IF FINDOPEN(myDirectory)
PRINT "Directory exists, so let's open the file."
GOTO InDirectory
ELSE
PRINT "Directory does not exist.Let's create a new directory."
IF CREATEDIR(myDirectory)
PRINT myDirectory+" WAS CREATED"

LABEL InDirectory
IF OPENFILE(myfile, "C:\\clock\\my.txt", "W") = 0
PRINT "FILE OPENED"
WRITE myfile, one
CLOSEFILE myfile
ELSE
PRINT "PROBLEMS OPENING FILE"
ENDIF
ELSE
PRINT "could not create directory"
ENDIF
ENDIF
PRINT "Press Any Key To Close"
DO:UNTIL INKEY$ <> ""
CLOSECONSOLE
END


Regards,

Peter B.

Ionic Wind Support Team

Peter,
His problem was compiling, not executing.  Vista UAC prevents a program from creating files in the Program Files directory when using a standard user account.  The compiler creates a temporary file in the \bin directory containing link targets for the linker.

Generally you have to be use an admin account under Vista to use compilers. 

If it were a project, and not a single file compile, it probably would have worked fine as I changed Emergence a while back to allow the relink all functions and that temporary file exisits in the project directory instead.

Paul.
Ionic Wind Support Team

ExMember001

the best way i found under vista is to install Emergence in the User directory
this way you can make change easily.

pistol350

Quote from: Paul Turley on May 23, 2008, 06:56:10 PM
Peter,
His problem was compiling, not executing.  Vista UAC prevents a program from creating files in the Program Files directory when using a standard user account.  The compiler creates a temporary file in the \bin directory containing link targets for the linker.

Generally you have to be use an admin account under Vista to use compilers. 

If it were a project, and not a single file compile, it probably would have worked fine as I changed Emergence a while back to allow the relink all functions and that temporary file exisits in the project directory instead.

Paul.

Thank you Paul.
Vista can really be a pain in the a**.
Regards,

Peter B.

Barney

Been using Vista for quite some years now. Never had any real problems. One thing I always did, I disabled UAC (User Account Control) the moment I installed Vista. After that no nags, no annoyances. :)

Barney