Author Topic: Newbie Stuff  (Read 3571 times)

0 Members and 1 Guest are viewing this topic.

Offline earnestduke

  • Newbie
  • Posts: 3
    • View Profile
Newbie Stuff
« on: November 27, 2020, 05:22:24 pm »
I apologize for not being able to find it, but where is the real just getting started info? I loaded qb64 and created the Hello World program. Upon running, the output window flashed maybe one-half second and was gone. How can I get it to stay? Thanks!

FellippeHeitor

  • Guest
Re: Newbie Stuff
« Reply #1 on: November 27, 2020, 05:24:59 pm »
Hello, earnestduke, and welcome to the Forum (and QB64).

Unless you ended your program with SYSTEM, your window should wait for you to "Press any key to continue" before it will unload.

Since QB64 is not an interpreter, you will find your compiled program in QB64's folder (likely named as untitled.exe if you hadn't saved the code before you compiled it). Running untitled.exe should show your Hello, world message again.

If you're after a tutorial, I can recommend Terry Ritchie's webpage: www.qb64sourcecode.com

Glad to have you with us.

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: Newbie Stuff
« Reply #2 on: November 28, 2020, 07:57:57 pm »
I apologize for not being able to find it, but where is the real just getting started info? I loaded qb64 and created the Hello World program. Upon running, the output window flashed maybe one-half second and was gone. How can I get it to stay? Thanks!

Hi..
it sounds like you are executing your program from the .exe file (i.e. you went to the folder and ran it). Without some type of pause in your program, it will FLASH as you say then go away.

Try this:
go back to the editor, and press F5 and it will compile AND run your program, then it will pause waiting for you to exit the run. This is a much preferred method to execute your programs while you are editing (at least that is how I test mine).

If you prefer executing programs like this (text based - which I love), you will have to put a pause line, easiest way is just do this:

input x (or any var)

and then the program will stop waiting for you to press something..

TIP:

I would highly suggest that at the top of your program that you use the command

OPTION EXPLICIT

This way, you don't get into any bad habits at the beginning of your learning  :-)

Hope this helps!!
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline earnestduke

  • Newbie
  • Posts: 3
    • View Profile
Re: Newbie Stuff
« Reply #3 on: November 29, 2020, 01:53:58 pm »
Thanks, Fellippe and xra7en!
This is probably more of a Windows OS operator error issue than a QB64 issue. Feel free to point me somewhere else.
I downloaded, unzipped and ran QB64_1.4 on another Windows 10 desktop (asus) and everything worked just fine. On the Windows 10 desktop (hp) I am trying to get it to work on, I think I mangled something by multiple downloading and deleting of the QB64 system. (I didn’t find an uninstall entry in the Control Panel.)
The best I can remember, I did the following:
•   Downloaded the QB64_1.3~.7z zip file and unzipped it under the “Program Files” folder. (This was my first use of .7z.) I saw where that location is a no-no, so I deleted that subdirectory.
•   Repeated the process for the 1.3 version to the “Downloads” subdirectory, again using the .7z file.
•   Tried to create the “Hello World” program and ran into the “flash” output screen problem.
Per Fellippe’s suggestion, I referenced the Terry Ritchie tutorial. I deleted the QB64_1.3 subdirectory. I downloaded the QB64_1.4 file (.zip this time) to the desktop and unzipped it to a desktop folder. Created a program of just PRINT “HW” and ran it from the IDE. It just flashed like before.
Per xra7en’s suggestion, put in statement “INPUT i” with same result. Put in FOR NEXT loop and gradually increased the count to a billion. Same result. This is all running from the IDE. Running the exe from Windows File Explorer results in the error: “Windows cannot access the specified device path or file. You may not have the appropriate permissions to access the item.”
Running the .exe using cmd results in “Access is denied.”
•   I know next to nothing about environment variables but I did look in System Information and there are no environment variable entries containing the string "QB64".
Thanks for any inputs!

Offline NOVARSEG

  • Forum Resident
  • Posts: 509
    • View Profile
Re: Newbie Stuff
« Reply #4 on: November 29, 2020, 07:05:56 pm »
HI

OK it looks windows won't  run  the exe program.
What is the full file name path that the EXE resides in?

Here is a link on file permissions
https://docs.microsoft.com/en-us/archive/msdn-magazine/2008/november/access-control-understanding-windows-file-and-registry-permissions

« Last Edit: November 29, 2020, 07:46:45 pm by NOVARSEG »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Newbie Stuff
« Reply #5 on: November 29, 2020, 07:10:04 pm »
Sounds like a permissions problem, or an anti-virus problem.

2 steps I would take to fix this:

1) Create a dedicated folder for QB64 at somewhere like C:\QB64.  Extract the files there — this should get around permission problems.

2) Go into your antivirus and whitelist that whole folder.

I imagine those 2 steps will correct your problem.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline earnestduke

  • Newbie
  • Posts: 3
    • View Profile
Re: Newbie Stuff
« Reply #6 on: November 29, 2020, 08:02:52 pm »
Thanks NOVARSEG and SMcNeill for the responses.
The path to the .exe files (including QB64.exe) along with the .bas and .exe user files is: C:\Users\earne\Desktop\qb64.
I use PC Matic and haven't learned how to whitelist a subdirectory yet. However, I did set the protection to "Manual Override" so I can choose. It works! Thanks much!