• Print

Author Topic: Commandline options  (Read 553 times)

659_minifly

  • Full Member
  • ***
  • Posts: 120
Commandline options
« on: July 04, 2011, 10:11:22 AM »
Hello
what are the Commandline options when launching QB64.exe

Thanks

chronokitsune

  • Guest
Re: Commandline options
« Reply #1 on: July 04, 2011, 10:16:07 AM »
The -c option exists for compiling via command line without running the IDE.  Other than that, there are none currently.

Clippy

  • Hero Member
  • *****
  • Posts: 16439
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: Commandline options
« Reply #2 on: July 04, 2011, 10:17:55 AM »
There is only ONE: QB64 -c to compile. In a batch file you can add %1 or its equivalent for drag and drop or commands like BATFile BASfile.bas.

See my QB64BAT.ZIP below.
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

659_minifly

  • Full Member
  • ***
  • Posts: 120
Re: Commandline options
« Reply #3 on: July 04, 2011, 12:48:35 PM »
Hi
Thanks you
pat

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: Commandline options
« Reply #4 on: December 29, 2012, 03:17:41 AM »
Does this still hold true?

By going through and sorting the code, I've noticed that there seems to be a -x switch also available for QB64 now.

Code: [Select]
DIM SHARED command2$
command2$ = COMMAND$ 'This is our command line parameter, if we have one.

DIM SHARED ConsoleMode
a$ = LTRIM$(RTRIM$(command2$))
a2$ = LCASE$(LEFT$(a$, 2))
IF a2$ = "-x" THEN command2$ = "-c" + RIGHT$(a$, LEN(a$) - 2): ConsoleMode = 1
IF ConsoleMode THEN
    _DEST _CONSOLE
ELSE
    _CONSOLE OFF
    _SCREENSHOW
END IF

It seems as if -x works just the same as -c, except it runs in the console and not the QB64 default screen.   Are there any other switches out there, that one can use when running QB64?
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

mcalkins

  • Hero Member
  • *****
  • Posts: 1269
    • qbasicmichael.com
    • Email
Re: Commandline options
« Reply #5 on: December 29, 2012, 04:19:51 AM »
Those are the only two that I know about. I think there should be a lot more.

For example, to select optimization level.
To explicitly add an object file, perhaps containing resources.
Perhaps to add to or override the seach paths for includes and libraries.
To statically link to a runtime library, or to use the .DLLs.
Perhaps to selectively disable some features of the language.
Perhaps to enable or disable warnings.

Regards,
Michael
The QBASIC Forum Community: http://www.network54.com/index/10167 Includes off-topic subforums.
QB64 Off-topic subforum: http://qb64offtopic.freeforums.org/

LeChuck

  • Hero Member
  • *****
  • Posts: 895
  • 18 * 37
Re: Commandline options
« Reply #6 on: December 31, 2012, 01:08:15 AM »
Quote from: mcalkins on December 29, 2012, 04:19:51 AM
Those are the only two that I know about. I think there should be a lot more.

For example, to select optimization level.
To explicitly add an object file, perhaps containing resources.
Perhaps to add to or override the seach paths for includes and libraries.
To statically link to a runtime library, or to use the .DLLs.
Perhaps to selectively disable some features of the language.
Perhaps to enable or disable warnings.

Regards,
Michael

I agree.
Two or more, use a FOR!

mn64

  • Full Member
  • ***
  • Posts: 184
Re: Commandline options
« Reply #7 on: December 31, 2012, 08:07:07 AM »
i never used a lot of command line options in qb45. the one i needed the most was one that told it to compile standalone instead of requiring brun45, but i'm not sure i would have used it.

command line options are great-- when they're options. but i hope there aren't so many of them (or that using them becomes so vital) that they end up with their own subforum. i mean, there's another dialect where command line options are a poor substitute for metacommands.

if i had to use a switch to turn off autoindent for example, i'd probably be "stuck" with it on. i'm not going to make a script to run it, every time i install qb64.

then again, i'm not really that pessimistic. but i think it should be said.

Clippy

  • Hero Member
  • *****
  • Posts: 16439
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: Commandline options
« Reply #8 on: December 31, 2012, 09:06:29 AM »
That option is in the IDE already.
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

mn64

  • Full Member
  • ***
  • Posts: 184
Re: Commandline options
« Reply #9 on: January 05, 2013, 07:50:53 AM »
i was definitely surprised that there is no /run or -r or --run switch. is there some reason that's difficult to implement?

Clippy

  • Hero Member
  • *****
  • Posts: 16439
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: Commandline options
« Reply #10 on: January 05, 2013, 08:11:11 AM »
There is no RUN because it has to compile first. If nothing is changed, the program will just run when F5 is pressed the second time.

You don't need to switch anything when the EXE file is run. Just call it by name or click on it.

QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

  • Print