HTBasic Help
×
Menu
Index

Startup Customization

 

Global Settings

You may wish to include some of the following configuration settings in your AUTOST program or in your program headers that effect the run environment:
 

Explicit Declaration of Variables

By default, undeclared numeric variables of type REAL. String variables have a maximum length of 18, and arrays have an upper bound of ten (and a lower bound of the default OPTION BASE) for each subscript in their first occurrence. You must specify CONFIGURE DIM OFF to enforce Explicit declarations (or CONFIGURE DIM ON to reset to implicit mode).
 
When Explicit mode is on, you must explicitly declare variables with REAL, INTEGER, COMPLEX, or DIM (for strings).  During prerun, any undeclared variables will generate an error on the message line. Enabling explicit mode (by turning CONFIGURE DIM OFF) can greatly help in finding misspelled variable names. However, undeclared variables will not be reported until the next prerun occurs such as by changing a program line and pressing the STEP key.
 

Set Save to Standard Windows File Format

To override the default Save behavior, which, for legacy support saves in HP LIF format, use CONFIGURE SAVE ASCII OFF.
 

Set Default Screen Dump format to PCL

CONFIGURE DUMP TO "PCL"
 

Windows Screen Resolution Compatibility Issues

If you have a high resolution display and the HTBasic program and text seem blurry, you can experiment with the Windows "DPI settings". Right-click on the HTBasic shortcut icon on your desktop and select Properties. In the Properties dialog click on the "Compatibility" tab and at the bottom of that dialog click on "Change high DPI settings". Then try the bottom check box "Override high DPI scaling behavior". This may improve clarity of text. Then try the "Scaling performed by:" drop down box and select "System (enhanced)". This may improve resolution of button icons.

Command Line Switches

One or more optional command line switches can be specified when starting HTBasic to customize the startup behavior. To do this, right-click on the HTBasic shortcut icon on your desktop and select Properties. Under the Shortcut tab, you can modify the target path if desired, and then add any of the Command Line Switch(es) desired (as outlined below) to the end of the target start path (separating multiple switches with a space). They can be abbreviated to the shortest unique abbreviation.
 
Command Line Switch Example
 
 

Alternate AUTOST Program Switch

The -ALT switch can be used to automatically run an alternate AutoStart program at startup (rather than the default one named "AUTOST.BAS" in the install directory). For example, the following line will start HTBasic and run a program named startup.bas in the root directory of drive C: 
 
"C:\Program Files (x86)\HTBasic\HTBasic.exe" -ALT c:\startup.bas 
 
To start HTBasic without automatically running any startup program, specify any non-existent file name: 
 
"C:\Program Files (x86)\HTBasic\HTBasic.exe" -ALT none 
 

Extended Output Area Buffer Switch

The -buf switch specifies the number of lines to reserve for the Extended Output Area. The visible portion of the screen is called the Output Area. HTBasic saves lines that scroll off the top of the screen, effectively increasing the number of screen lines. The buffer containing the on-screen and off-screen lines of text is called the Extended Output Area buffer. The -buf switch determines the number of lines in the buffer. The default is 160. For example, if you have 25 lines on-screen but wish to be able scroll back through 200 previous lines, use this line:
 
"C:\Program Files (x86)\HTBasic\HTBasic.exe" -buf 225
 
 

Font Switch

The -fn switch specifies an alternate Windows font and font size to use in place of the default font (Consolas). If the font name contains a space, enclose it in quotes. For example:
 
"C:\Program Files (x86)\HTBasic\HTBasic.exe" -fn "Courier New",-12,255 
 
This sets Courier New as the font at 12-point size (with a code page 437 mapping). If size is positive, the spacing is in pixels; if negative, the spacing is in points (1/72 inch increments). Only fixed-width (mono-spaced) fonts should be used. Although most Windows fonts represent the ISO 8859 (Latin 1) character set, not all do. If the keyboard is set to one character set and the screen font uses a different character set, it is possible for non-ASCII characters to display incorrectly or not at all.
 
This selected font also sets the HTBasic Edit screen font but is not retained unless updated in the Edit Environment Dialog. This allows multiple startup shortcuts to have their own font settings.
 
SYSTEM$("FONT") returns the name of the current Windows font in use.
 
 

Window Geometry (Size/Position) Switch

The -geometry WIDTHxHEIGHT[+XOFF+YOFF] switch specifies the size and optionally the position of the HTBasic window. Width and Height can be specified in either pixels or characters, but the same units must be used for both. A Height less than 100 is interpreted as characters (columns by rows), otherwise the units are interpreted as pixels. The optional Xoff and Yoff (always in pixels) specify the position of the HTBasic window on the display relative to the upper-left corner of the internal child window’s display. By default, HTBasic creates a window that fills the screen. So, for example:
 
"C:\Program Files (x86)\HTBasic\HTBasic.exe" -geometry 80x25
"C:\Program Files (x86)\HTBasic\HTBasic.exe" -ge 1024x768+200+100  
 
In the first case a window is created that is 80 columns by 25 lines. Its unspecified position is set by the window manager. In the second case a window is created that is 1024 by 768 pixels, positioned 100 pixels from the top and 200 from the left edge of the screen.
 
 

Window Title Switch

The -title name switch, where name is the title string, specifies the title displayed in the title bar of the HTBasic window and the minimized icon. If the title contains spaces or apostrophes, place quotes around it. For example:
 
"C:\Program Files (x86)\HTBasic\HTBasic.exe" -title "Test System" 
 
 

Workspace Memory Switch

The -w size[k|m] switch (where k=Kilobytes and m=Megabytes) specifies how much memory to set aside for your programs and data. Size must be a whole number. The default is 512MB which should be sufficient for most apps. The following example allocates 256 megabytes:
 
"C:\Program Files (x86)\HTBasic\HTBasic.exe" -w 256m 
 
 

Processor Core Selection Switch

The -p core switch (where core=core number) allows the user to select which processor core HTBasic will run on. For example to select the first core:
 
"C:\Program Files (x86)\HTBasic\HTBasic.exe" -p 1