Author Topic: The Options under "Run" on the IDE menu  (Read 5711 times)

0 Members and 1 Guest are viewing this topic.

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
The Options under "Run" on the IDE menu
« on: August 06, 2020, 10:05:12 am »
I'm not exactly sure how or when to use the various options associated with "Run". How does that "Modify Command$" work and what factors do I need to consider in chosing "Output EXE to Source Folder" v's "Make Exe Only".

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: The Options under "Run" on the IDE menu
« Reply #1 on: August 06, 2020, 12:45:34 pm »
Modify Command probably allows advanced compile switches as if you were doing it manually from the command line. (I've never used.)


Output EXE to Source, saves the compiled EXE with the .BAS source code the other option is under main QB64 folder (without bullet). If you have assets to go with program you usually want to save .EXE with source .BAS code.

Make .EXE will just compile the source .BAS file and not Run it.




« Last Edit: August 06, 2020, 12:47:26 pm by bplus »

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Re: The Options under "Run" on the IDE menu
« Reply #2 on: August 06, 2020, 01:37:34 pm »
So an EXE extension means a stand alone program. When I'm searching my different drives these files (at least in Windows) are described as "Applications". Clicking on them runs the program.
The Source File is the wannabe/half baked program which carries the unfinished coding - at least that is what I think a Source File is, and this Source File can be saved with many extensions  BAS being one of them. So what would be the advantage of putting a complete stand alone EXE, in a BAS Source File?

I tend to have multipe .BAS unfinished programs. They carry different coding ideas which I can sometimes merge into a larger program. Is there any advantage in having any or all of these various .BAS file contain an EXE within it??

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: The Options under "Run" on the IDE menu
« Reply #3 on: August 06, 2020, 02:00:56 pm »
So an EXE extension means a stand alone program. When I'm searching my different drives these files (at least in Windows) are described as "Applications". Clicking on them runs the program.
The Source File is the wannabe/half baked program which carries the unfinished coding - at least that is what I think a Source File is, and this Source File can be saved with many extensions  BAS being one of them. So what would be the advantage of putting a complete stand alone EXE, in a BAS Source File?

I tend to have multipe .BAS unfinished programs. They carry different coding ideas which I can sometimes merge into a larger program. Is there any advantage in having any or all of these various .BAS file contain an EXE within it??

What? I for one want my .EXE compiled file/program/app in the same FOLDER as the .BAS source file from which it was made by QB64 when I Run it.

Though a source can have many extensions other than .BAS, .BAS is pretty much standard.

Say @Dimster do you keep all your source files in one folder and use extensions other than .BAS?
« Last Edit: August 06, 2020, 02:09:29 pm by bplus »

FellippeHeitor

  • Guest
Re: The Options under "Run" on the IDE menu
« Reply #4 on: August 06, 2020, 02:50:57 pm »
Would it be too much if I made a video about this one? Might be good for a series aimed at the _basics_ of QB64.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: The Options under "Run" on the IDE menu
« Reply #5 on: August 06, 2020, 03:05:34 pm »
Would it be too much if I made a video about this one? Might be good for a series aimed at the _basics_ of QB64.

Man I hate to think about anyone being held up with using QB64 because of things like this.

@FellippeHeitor You do make things pretty clear visually IMO. :)

FellippeHeitor

  • Guest
Re: The Options under "Run" on the IDE menu
« Reply #6 on: August 06, 2020, 03:44:06 pm »
There goes:

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Re: The Options under "Run" on the IDE menu
« Reply #7 on: August 06, 2020, 04:09:49 pm »
I guess from my question and bplus answer that I may be out to lunch on my approach to the use of extensions and an EXE.

I just write code and F5 it, once it's doing what I expect it to do then is gets saved with a much description as seems to explain it. The saved program will have no extension at all unless it is meanful to me - for example .TXT is just a collect of REM comments from a variety of programs, or .LAP means this code was written on the laptop, stuff like that. I have an extension WnI for coding that has failled With No Idea why (ie MargChangeCalcFailure.WnI)

I haven't finished a complete program in quite awhile but once it was completed, that's when it got the EXE extension.

As for FOLDERS and the connection they have with writting and saving program code with an extension - I don't really need Folders. All the code and code snippets that I'm writting are for one massive program. All of it is saved on a USB with backup on a hard drive and CD. I can access any section or portion just by the "OPEN" command (which by the way is so restricted in the display of the full title of programs available to Open - which is the same for the display of Subs under "View". There you get a massive screen with so little of the title but I digress). I'm suspecting FOLDER  could be the cause of my confusion on the "Run" options.

I'm wondering now if every time I F5 some code, is an EXE being created?

I'd love to see a video on it Fellippe - To actually see it in use and operation would be of help, especially if it will help me catch up the programming prowess of you guys and girls

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: The Options under "Run" on the IDE menu
« Reply #8 on: August 06, 2020, 04:26:38 pm »
Thanks @FellippeHeitor you reminded me I do use COMMAND$.

I use it to pass a filename to the compiled EXE by Copying the file name in Windows Explorer and then Pasting it to the EXE, that passes the filename to the EXE for using through the COMMAND$ line function.

And to test the code while developing the EXE you use that option in the Run Menu > Modify COMMAND$ and give it a filename to test.

Now I am wondering, are there command prompt line switches for compiling you can also pass through QB64 COMMAND$ function for compiling options or is that all Meta Command stuff that has to go in source code?

« Last Edit: August 06, 2020, 04:28:51 pm by bplus »

FellippeHeitor

  • Guest
Re: The Options under "Run" on the IDE menu
« Reply #9 on: August 06, 2020, 04:28:01 pm »
When you type qb64 --help in the command line, this is what you get:

Quote
QB64 Compiler V1.5

Usage: qb64 [switches] <file>

Options:
  <file>                  Source file to load
  -v                      Verbose mode
  -c                      Compile instead of edit
  -x                      Compile instead of edit and output the result to the
                             console
  -p                      Purge all pre-compiled content first
  -z                      Generate C code without compiling to executable
  -o <output file>        Write output executable to <output file>
  -e                      Enables OPTION _EXPLICIT, making variable declaration
                             mandatory (per-compilation; doesn't affect the
                             source file or global settings)
  -s[:switch=true/false]  View/edit compiler settings
  -l:<line number>        Starts the IDE at the specified line number

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: The Options under "Run" on the IDE menu
« Reply #10 on: August 06, 2020, 04:30:21 pm »
Excellent video, Fellippe!  I'm sure IDE videos like these will be a great help to many people. 

- Dav

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: The Options under "Run" on the IDE menu
« Reply #11 on: August 06, 2020, 04:32:46 pm »
When you type qb64 --help in the command line, this is what you get:

OK those switches probably don't work through the COMMAND$ function, correct? because it's everything past the <filename>

FellippeHeitor

  • Guest
Re: The Options under "Run" on the IDE menu
« Reply #12 on: August 06, 2020, 04:33:11 pm »
Thanks, Dav! I mean, as long as it remains all free to make/share, I'll keep 'em coming ❤️

FellippeHeitor

  • Guest
Re: The Options under "Run" on the IDE menu
« Reply #13 on: August 06, 2020, 04:33:43 pm »
OK those switches probably don't work through the COMMAND$ function, correct? because it's everything past the <filename>

Seems like you're looking to set COMMAND$ in the IDE via command-line - no, that won't work.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: The Options under "Run" on the IDE menu
« Reply #14 on: August 06, 2020, 04:37:02 pm »
Seems like you're looking to set COMMAND$ in the IDE via command-line - no, that won't work.

No, I was wondering if I can throw some compile switches from Modify COMMAND$ line option in IDE but I think NOW that COMMAND$ is everything AFTER the filename and switches come before that.