1141 lines
60 KiB
Text
1141 lines
60 KiB
Text
# The MIT License (MIT)
|
|
#
|
|
# Copyright (C) 2026 Scott Duensing
|
|
#
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
# of this software and associated documentation files (the "Software"), to
|
|
# deal in the Software without restriction, including without limitation the
|
|
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
# sell copies of the Software, and to permit persons to whom the Software is
|
|
# furnished to do so, subject to the following conditions:
|
|
#
|
|
# The above copyright notice and this permission notice shall be included in
|
|
# all copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
# IN THE SOFTWARE.
|
|
|
|
.topic ide.overview
|
|
.title DVX BASIC IDE Guide
|
|
.toc 0 Overview
|
|
.default
|
|
.index DVX BASIC
|
|
.index IDE
|
|
.index Visual Basic
|
|
.index Development Environment
|
|
|
|
.h1 DVX BASIC IDE Guide
|
|
|
|
DVX BASIC is a Visual BASIC development environment for DVX. It provides a VB3-style integrated development environment with a code editor, form designer, project system, and a full interactive debugger -- all integrated into DVX itself.
|
|
|
|
This guide covers every feature of the IDE: menus, toolbar, editor, form designer, project management, debugger, and auxiliary windows.
|
|
|
|
.h2 IDE Windows
|
|
|
|
The DVX BASIC IDE is modeled after Visual Basic 3.0. It consists of several floating windows arranged on the DVX desktop:
|
|
|
|
.list
|
|
.item Main Toolbar Window -- anchored at the top of the screen. Contains the menu bar, toolbar buttons, and status bar.
|
|
.item Code Editor -- the primary editing surface for BASIC source code, with Object/Event dropdowns, syntax highlighting, and line numbers.
|
|
.item Form Designer -- a visual design surface for .frm files, showing a WYSIWYG preview of the form with grab handles for resizing controls.
|
|
.item Project Explorer -- a tree view listing all files in the project.
|
|
.item Toolbox -- a palette of available controls for placing on forms.
|
|
.item Properties Panel -- a tree of controls and a list of editable properties for the selected control.
|
|
.item Output Window -- displays PRINT output and runtime errors.
|
|
.item Immediate Window -- an interactive REPL for evaluating expressions and modifying variables at runtime.
|
|
.item Debug Windows -- Locals, Call Stack, Watch, and Breakpoints windows that appear automatically when debugging.
|
|
.endlist
|
|
|
|
The IDE compiles BASIC source into bytecode and runs it in an integrated virtual machine. Programs execute in cooperative slices, yielding to DVX between slices so the GUI remains responsive. Call DoEvents in long-running loops to keep the event loop flowing.
|
|
|
|
.link ide.menu.file File Menu
|
|
.link ide.menu.edit Edit Menu
|
|
.link ide.menu.run Run Menu
|
|
.link ide.menu.view View Menu
|
|
.link ide.menu.window Window Menu
|
|
.link ide.menu.tools Tools Menu
|
|
.link ide.menu.help Help Menu
|
|
.link ide.toolbar Toolbar
|
|
.link ide.editor Code Editor
|
|
.link ide.designer Form Designer
|
|
.link ide.project Project System
|
|
.link ide.properties Properties Panel
|
|
.link ide.toolbox Toolbox
|
|
.link ide.debugger Debugger
|
|
.link ide.debug.locals Locals Window
|
|
.link ide.debug.callstack Call Stack Window
|
|
.link ide.debug.watch Watch Window
|
|
.link ide.debug.breakpoints Breakpoints Window
|
|
.link ide.immediate Immediate Window
|
|
.link ide.output Output Window
|
|
.link ide.findreplace Find / Replace
|
|
.link ide.preferences Preferences
|
|
.link ide.shortcuts Keyboard Shortcuts
|
|
|
|
.topic ide.menu.file
|
|
.title File Menu
|
|
.toc 1 Menu Reference
|
|
.toc 2 File Menu
|
|
.index File Menu
|
|
.index New Project
|
|
.index Open Project
|
|
.index Save Project
|
|
.index Close Project
|
|
.index Project Properties
|
|
.index Add File
|
|
.index Save File
|
|
.index Save All
|
|
.index Remove File
|
|
.index Exit
|
|
|
|
.h1 File Menu
|
|
|
|
.table
|
|
Menu Item Shortcut Description
|
|
--------- -------- -----------
|
|
New Project... Create a new DVX BASIC project.
|
|
Open Project... Open an existing .dbp project file.
|
|
Save Project Save the current project file to disk.
|
|
Close Project Close the current project (prompts to save unsaved changes; Don't Save also discards unsaved Project Properties changes).
|
|
---
|
|
Project Properties... Edit project metadata (name, author, version, startup form, icon, etc.) and the command line arguments used when the program is run from the IDE.
|
|
---
|
|
Add File... Ctrl+O Add a .bas or .frm file to the project. If no project is open, creates an implicit project from the file. A file that cannot be read, or is 64 KB or larger, is refused with a message.
|
|
Save File Ctrl+S Save the active file to disk.
|
|
Save All Save all modified files in the project.
|
|
---
|
|
Make Executable... Compile the project and save it as a standalone .app file. Prompts for a debug or release build.
|
|
---
|
|
Remove File Remove the selected file from the project (prompts to save if modified).
|
|
---
|
|
Exit Close the IDE (prompts to save unsaved changes).
|
|
.endtable
|
|
|
|
A project (.dbp) or source file (.bas, .frm) named on the IDE's command line opens when the IDE starts, so double-clicking one in the File Manager, or starting it from the Program Manager, opens it in the IDE.
|
|
|
|
Files are saved exactly as edited (LF line endings). Each save writes a temporary file first and replaces the original only when the write succeeded. Opening a project that fails to load keeps the current project open and removes the failed entry from the Recent list.
|
|
|
|
.link ide.menu.edit Edit Menu
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.menu.edit
|
|
.title Edit Menu
|
|
.toc 2 Edit Menu
|
|
.index Edit Menu
|
|
.index Cut
|
|
.index Copy
|
|
.index Paste
|
|
.index Select All
|
|
.index Delete
|
|
.index Find
|
|
.index Find Next
|
|
.index Replace
|
|
|
|
.h1 Edit Menu
|
|
|
|
.table
|
|
Menu Item Shortcut Description
|
|
--------- -------- -----------
|
|
Cut Ctrl+X Cut the selection (text, or the selected control in the form designer) to the clipboard.
|
|
Copy Ctrl+C Copy the selection to the clipboard.
|
|
Paste Ctrl+V Paste from the clipboard. A pasted control keeps all of its properties.
|
|
---
|
|
Select All Ctrl+A Select all text in the active editor.
|
|
---
|
|
Delete Del Delete the selected text, or the selected control and everything inside it (in the form designer).
|
|
---
|
|
Find... Ctrl+F Open the Find/Replace dialog.
|
|
Find Next F3 Find the next occurrence of the search text (also after the dialog is closed).
|
|
Replace... Ctrl+H Open the Find/Replace dialog with replace enabled.
|
|
.endtable
|
|
|
|
Cut, Copy, Paste, Select All and Delete act on the window you last worked in: the form designer's selected control, or the text of the code, output or immediate window.
|
|
|
|
.link ide.menu.run Run Menu
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.menu.run
|
|
.title Run Menu
|
|
.toc 2 Run Menu
|
|
.index Run Menu
|
|
.index Run
|
|
.index Debug
|
|
.index Run Without Recompile
|
|
.index Stop
|
|
.index Step Into
|
|
.index Step Over
|
|
.index Step Out
|
|
.index Run to Cursor
|
|
.index Toggle Breakpoint
|
|
.index Clear Output
|
|
.index Save on Run
|
|
|
|
.h1 Run Menu
|
|
|
|
.table
|
|
Menu Item Shortcut Description
|
|
--------- -------- -----------
|
|
Run F5 Compile and run the program. If paused at a breakpoint, resumes execution with debugging disabled (runs free).
|
|
Debug Shift+F5 Compile and run with the debugger active. Breakpoints are active but execution does not pause at the first statement. If paused, resumes to the next breakpoint.
|
|
Run Without Recompile Ctrl+F5 Re-run the last compiled module without recompiling.
|
|
Stop Esc Stop the running program. Run, Debug and the project commands stay disabled until the program has finished shutting down.
|
|
---
|
|
Step Into F8 Execute one statement, stepping into SUB/FUNCTION calls. If idle, starts a debug session and breaks at the first statement.
|
|
Step Over Shift+F8 Execute one statement, stepping over SUB/FUNCTION calls.
|
|
Step Out Ctrl+Shift+F8 Run until the current SUB/FUNCTION returns.
|
|
Run to Cursor Ctrl+F8 Run until execution reaches the line where the cursor is positioned.
|
|
---
|
|
Output Window to Log Checkbox: when enabled, PRINT output (each line once) and compile and runtime error reports are also written to the DVX log. Persisted in preferences.
|
|
---
|
|
Toggle Breakpoint F9 Toggle a breakpoint on the current editor line.
|
|
---
|
|
Clear Output Clear the Output window.
|
|
---
|
|
Save on Run Checkbox: when enabled, all modified files are saved automatically before compiling. Persisted in preferences.
|
|
.endtable
|
|
|
|
.link ide.menu.view View Menu
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.menu.view
|
|
.title View Menu
|
|
.toc 2 View Menu
|
|
.index View Menu
|
|
.index Code View
|
|
.index Design View
|
|
.index Toolbar Toggle
|
|
.index Status Bar Toggle
|
|
.index Menu Editor
|
|
|
|
.h1 View Menu
|
|
|
|
.table
|
|
Menu Item Shortcut Description
|
|
--------- -------- -----------
|
|
Code F7 Switch to Code view for the active file (or the file selected in the Project Explorer).
|
|
Designer Shift+F7 Switch to Design view for the active form file. With a module (.bas) active it reports that the file is not a form. The designer keeps its unsaved state while you work in a module.
|
|
---
|
|
Toolbar Checkbox: show or hide the toolbar. Persisted in preferences.
|
|
Status Bar Checkbox: show or hide the status bar. Persisted in preferences.
|
|
---
|
|
Menu Editor... Ctrl+E Open the Menu Editor dialog for the active form (a form must be active). Allows designing menu bars with captions, names, levels, checked state, and enabled state. See Menu Editor below.
|
|
.endtable
|
|
|
|
.link ide.menu.window Window Menu
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.menu.window
|
|
.title Window Menu
|
|
.toc 2 Window Menu
|
|
.index Window Menu
|
|
|
|
.h1 Window Menu
|
|
|
|
.table
|
|
Menu Item Description
|
|
--------- -----------
|
|
Code Editor Show or raise the Code Editor window.
|
|
Output Show or raise the Output window.
|
|
Immediate Show or raise the Immediate window.
|
|
Locals Show or raise the Locals debug window.
|
|
Call Stack Show or raise the Call Stack debug window.
|
|
Watch Show or raise the Watch debug window.
|
|
Breakpoints Show or raise the Breakpoints window.
|
|
---
|
|
Project Explorer Show or raise the Project Explorer window.
|
|
Toolbox Show or raise the Toolbox window.
|
|
Properties Show or raise the Properties panel.
|
|
.endtable
|
|
|
|
.link ide.menu.tools Tools Menu
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.menu.tools
|
|
.title Tools Menu
|
|
.toc 2 Tools Menu
|
|
.index Tools Menu
|
|
.index Preferences
|
|
.index Debug Layout
|
|
|
|
.h1 Tools Menu
|
|
|
|
.table
|
|
Menu Item Description
|
|
--------- -----------
|
|
Preferences... Open the Preferences dialog (editor settings and project defaults).
|
|
---
|
|
Debug Layout Checkbox: toggle a debug overlay that shows widget layout boundaries. Useful for diagnosing widget layout issues.
|
|
.endtable
|
|
|
|
.link ide.menu.help Help Menu
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.menu.help
|
|
.title Help Menu
|
|
.toc 2 Help Menu
|
|
.index Help Menu
|
|
.index About
|
|
|
|
.h1 Help Menu
|
|
|
|
.table
|
|
Menu Item Shortcut Description
|
|
--------- -------- -----------
|
|
DVX BASIC Help F1 Open the DVX BASIC help (language reference, IDE guide, and control reference).
|
|
DVX API Reference Open the DVX developer API reference.
|
|
---
|
|
About DVX BASIC... Show the About dialog with version and copyright information.
|
|
.endtable
|
|
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.toolbar
|
|
.title Toolbar
|
|
.toc 1 Toolbar
|
|
.index Toolbar
|
|
|
|
.h1 Toolbar
|
|
|
|
The toolbar is organized into four groups separated by vertical dividers. Each button has a tooltip showing its name and keyboard shortcut.
|
|
|
|
.h2 File Group
|
|
|
|
.table
|
|
Button Shortcut Action
|
|
------ -------- ------
|
|
Open Ctrl+O Add a file to the project (same as File > Add File).
|
|
Save Ctrl+S Save the active file.
|
|
.endtable
|
|
|
|
.h2 Run Group
|
|
|
|
.table
|
|
Button Shortcut Action
|
|
------ -------- ------
|
|
Run F5 Compile and run the program.
|
|
Stop Esc Stop the running program.
|
|
.endtable
|
|
|
|
.h2 Debug Group
|
|
|
|
.table
|
|
Button Shortcut Action
|
|
------ -------- ------
|
|
Debug Shift+F5 Start or resume a debug session.
|
|
Step Into F8 Step into the next statement.
|
|
Step Over Shift+F8 Step over the next statement.
|
|
Step Out Ctrl+Shift+F8 Step out of the current procedure.
|
|
Run to Cursor Ctrl+F8 Run to the cursor position.
|
|
.endtable
|
|
|
|
.h2 View Group
|
|
|
|
.table
|
|
Button Shortcut Action
|
|
------ -------- ------
|
|
Code F7 Switch to Code view.
|
|
Design Shift+F7 Switch to Design view.
|
|
.endtable
|
|
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.editor
|
|
.title Code Editor
|
|
.toc 1 Code Editor
|
|
.index Code Editor
|
|
.index Syntax Highlighting
|
|
.index Object Dropdown
|
|
.index Function Dropdown
|
|
.index Line Numbers
|
|
.index Auto-indent
|
|
|
|
.h1 Code Editor
|
|
|
|
The Code Editor is the primary editing window for BASIC source code. It occupies the center of the screen, below the toolbar and above the Output and Immediate windows.
|
|
|
|
.h2 Object and Function Dropdowns
|
|
|
|
At the top of the Code Editor are two dropdown lists:
|
|
|
|
.list
|
|
.item Object -- lists (General) plus all objects (form name, control names, menu item names). Selecting an object filters the Function dropdown.
|
|
.item Function -- lists all event handlers (procedures) for the selected object. Implemented handlers are listed first (plain text); unimplemented handlers follow in brackets (e.g., [Click]). Selecting an unimplemented event creates a new event handler stub.
|
|
.endlist
|
|
|
|
The editor shows one procedure at a time. Each procedure has its own buffer, and switching between them is instantaneous. The (General) section contains module-level declarations and code.
|
|
|
|
Text outside the procedure being shown is never lost: lines typed above or below the SUB move to (General), a second SUB typed into the buffer becomes a procedure of its own, and a procedure whose SUB line was deleted becomes (General) text. When you leave an event handler that was generated and never edited it is removed; empty SUBs and FUNCTIONs you wrote yourself are kept. After a save the editor shows exactly what was stored (blank lines around a procedure are normalized). A section too large for the editor opens read-only, with a message in the status bar.
|
|
|
|
.h2 Syntax Highlighting
|
|
|
|
The editor applies real-time syntax coloring as you type. Seven categories are highlighted in distinct colors; the colors themselves are editable in Tools > Preferences > Colors.
|
|
|
|
.table
|
|
Category Examples
|
|
-------- --------
|
|
Default Text Identifiers, whitespace.
|
|
Keywords IF, THEN, FOR, NEXT, SUB, FUNCTION, DIM, PRINT, SELECT, CASE, DO, LOOP, WHILE, WEND, END, EXIT, CALL, GOSUB, GOTO, RETURN, DECLARE, CONST, TYPE, AND, OR, NOT, XOR, MOD, etc.
|
|
Types INTEGER, LONG, SINGLE, DOUBLE, STRING, BOOLEAN, TRUE, FALSE
|
|
Strings "Hello, World!"
|
|
Comments ' This is a comment, REM This is a comment
|
|
Numbers 42, 3.14, &HFF
|
|
Operators =, <, >, +, -, *, /, \, &
|
|
.endtable
|
|
|
|
.h2 Editor Features
|
|
|
|
.list
|
|
.item Line numbers -- displayed in the gutter on the left side.
|
|
.item Auto-indent -- new lines are automatically indented to match the previous line.
|
|
.item Tab handling -- the Tab key is captured by the editor. Tab width and whether to insert spaces or tab characters are configurable in Preferences (default: 3 spaces).
|
|
.item Gutter click -- clicking in the line number gutter toggles a breakpoint on that line.
|
|
.item Line decorations -- breakpoint lines show a red dot in the gutter. The current debug line (when paused) is highlighted with a yellow background.
|
|
.endlist
|
|
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.designer
|
|
.title Form Designer
|
|
.toc 1 Form Designer
|
|
.index Form Designer
|
|
.index Design Surface
|
|
.index Grid Snapping
|
|
.index Grab Handles
|
|
.index Control Placement
|
|
.index WYSIWYG
|
|
|
|
.h1 Form Designer
|
|
|
|
The Form Designer provides a visual design surface for editing .frm files. Switch to it with Shift+F7 or the Design toolbar button. It opens in a separate window showing a WYSIWYG preview of the form.
|
|
|
|
.h2 Design Surface
|
|
|
|
.list
|
|
.item Grid snapping -- controls snap to an 8-pixel grid when placed or resized.
|
|
.item Selection -- click a control to select it. The selected control is highlighted with grab handles.
|
|
.item Grab handles -- 6x6 pixel handles appear on the right edge (E), bottom edge (S), and bottom-right corner (SE) of the selected control. Drag a handle to resize the control.
|
|
.item Reordering -- drag a control to reorder it among its siblings in the layout (VBox/HBox). A container moves together with its contents.
|
|
.item Placing controls -- select a control type in the Toolbox, then click on the form to place a new instance. The control is auto-named (e.g., Command1, Command2), skipping names already used by a control, a menu item or the form. Clicking the same tool again deselects it (toggles back to pointer mode). Controls nest at most 15 levels deep; a drop into a container that is already that deep goes into its parent container.
|
|
.item Menu bar preview -- if the form has menu items (defined via the Menu Editor), a preview menu bar is rendered on the design window.
|
|
.item Delete key -- removes the selected control and everything inside it.
|
|
.endlist
|
|
|
|
Opening a form in the designer does not mark it modified. A control whose Visible property is False is still shown on the design surface (the setting applies when the program runs). Disabling a container greys the controls inside it; a control's own Enabled = False is kept when the container is enabled again. A .frm file without an AutoSize line opens without AutoSize; AutoSize = True wins over Width and Height lines. Text values (Caption, Text and so on) are limited to 379 characters.
|
|
|
|
.h2 Menu Editor
|
|
|
|
The Menu Editor (View > Menu Editor, Ctrl+E) edits the active form's menu bar and popup menus. Menus nest at most 15 levels (0-14); indenting refuses when any item below would go deeper. OK rejects an item nested more than one level below the item above it, and a blank item that has sub-items (it must be named); blank items without sub-items are dropped. The window's close box cancels. Renaming a menu item renames its event handlers in the code and updates the ContextMenu setting of the form and its controls; inserting, deleting and moving items does not rename anything.
|
|
|
|
.h2 Form Properties
|
|
|
|
Forms have the following design-time properties: Name, Caption, Width, Height, Left, Top, Layout (VBox or HBox), Centered, AutoSize, Resizable, HelpTopic and ContextMenu.
|
|
|
|
.link ide.properties Properties Panel
|
|
.link ide.toolbox Toolbox
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.project
|
|
.title Project System
|
|
.toc 1 Project System
|
|
.index Project System
|
|
.index Project Files
|
|
.index .dbp Files
|
|
.index Project Explorer
|
|
.index Source Map
|
|
|
|
.h1 Project System
|
|
|
|
.h2 Project Files (.dbp)
|
|
|
|
A DVX BASIC project is stored as a .dbp file (DVX BASIC Project). The project file records:
|
|
|
|
.list
|
|
.item Name -- the project display name (up to 32 characters).
|
|
.item Startup Form -- which form to show automatically when the program starts.
|
|
.item Metadata -- Author, Company, Version, Copyright, Description (a single line), and Icon Path (for compiled binaries).
|
|
.item Arguments -- the command line the program gets (COMMAND$) when it is run from the IDE, for trying out a program that opens the file it is given. It is not built into the compiled program: there COMMAND$ returns whatever the program was started with.
|
|
.item Help File -- a compiled help file (.hlp) for the program. It is copied next to the compiled program, and F1 in the running program opens it, at the HelpTopic of the focused control or, failing that, of the form. Add help.bas to the project and call HelpView to open it from a Help menu.
|
|
.item File list -- relative paths of all .bas and .frm files in the project. Each entry tracks whether it is a form file.
|
|
.endlist
|
|
|
|
.h2 How Projects are Compiled
|
|
|
|
When the project is compiled, all source files are concatenated into a single source stream. The IDE tracks which lines belong to which file so error messages and debugger locations point to the correct .bas or .frm file. The code section of each .frm file is preceded by a hidden BEGINFORM marker that ties its code to its form.
|
|
|
|
.h2 Compile-Time Validation
|
|
|
|
Before the source is handed to the compiler, the IDE scans every .frm file and cross-checks the forms against the widget registry and the statements that reference them. Three classes of error are caught and reported without producing a binary:
|
|
|
|
.list
|
|
.item Unknown widget types -- any Begin TypeName ... End block whose TypeName does not match a registered widget is flagged. The error message names the offending form, control, and type, and hints that DVX uses VB6-style names (SpinButton, not Spinner).
|
|
.item Unknown properties -- statements of the form CtrlName.Property = value, or reads of CtrlName.Property, are checked against the widget's declared property list. A typo such as btn.Captoin triggers a compile error with the form, control, and property name. A control name that is used with different types on different forms is not checked.
|
|
.item Unknown methods -- method calls CtrlName.Method ... are checked the same way against the widget's method list, catching mistakes like list.AddTiem before the program ever runs.
|
|
.item Menu items -- only Name (read), Checked and Enabled can be used on a menu item in code; Caption, Visible and RadioCheck are design-time settings.
|
|
.endlist
|
|
|
|
These checks use the same metadata the Properties panel and Toolbox read from each widget DXE, so property and method names always match the current widget set without any separate list to maintain.
|
|
|
|
.h2 Project Operations
|
|
|
|
.table
|
|
Operation Description
|
|
--------- -----------
|
|
New Project Creates a blank project with a name and directory. A default .frm file is added automatically.
|
|
Open Project Opens a .dbp file and loads all referenced files into memory. A project file that is 64 KB or larger, or cannot be read, is not loaded; opening it later reports "Cannot load <file>: unreadable or larger than 65535 bytes." Carriage returns are removed when files are loaded.
|
|
Save Project Writes the .dbp file to disk.
|
|
Close Project Closes the project, prompting to save unsaved changes.
|
|
Add File Adds a .bas or .frm file to the project. Opening a file without a project auto-creates an implicit project.
|
|
Remove File Removes a file from the project (prompts to save if modified). Removing the startup form clears the Startup Form setting.
|
|
Project Properties Opens a dialog for editing project metadata (name, author, company, version, copyright, description, icon, help file, startup form) and the Arguments for runs from the IDE.
|
|
.endtable
|
|
|
|
.h2 Project Explorer
|
|
|
|
The Project Explorer is a tree view window listing all project files. Double-click a file to open it: .bas files open in Code view, .frm files open in Design view. The selected file in the Project Explorer determines the target for View > Code and View > Designer commands.
|
|
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.properties
|
|
.title Properties Panel
|
|
.toc 1 Properties Panel
|
|
.index Properties Panel
|
|
.index Control Properties
|
|
.index Property List
|
|
.index Control Tree
|
|
|
|
.h1 Properties Panel
|
|
|
|
The Properties panel (Window > Properties) has two sections:
|
|
|
|
.list
|
|
.item Control tree -- a TreeView at the top listing the form and all its controls in layout order. Click a control name to select it in both the Properties panel and the Form Designer. Drag items in the tree to reorder controls in the form's layout.
|
|
.item Property list -- a two-column ListView below the tree showing property names and values for the selected control. Double-click a property value to edit it via an InputBox dialog. Changes take effect immediately in the designer preview.
|
|
.endlist
|
|
|
|
Each control type exposes different properties (e.g., Caption, Text, Width, Height, MaxWidth, MaxHeight, Weight, Alignment, Enabled, Visible, and type-specific properties like DataSource and DataField for data-bound controls).
|
|
|
|
.link ide.designer Form Designer
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.toolbox
|
|
.title Toolbox
|
|
.toc 1 Toolbox
|
|
.index Toolbox
|
|
.index Controls
|
|
.index Widget Palette
|
|
|
|
.h1 Toolbox
|
|
|
|
The Toolbox (Window > Toolbox) is a floating palette of buttons, one for each available control type. Every widget registered with DVX that has a BASIC name appears in the toolbox.
|
|
|
|
Click a tool to select it (the active tool name is stored in the designer state), then click on the form to place a new instance. Click the same tool again to deselect it and return to pointer mode.
|
|
|
|
.h2 Available Controls
|
|
|
|
.table
|
|
VB Name Description
|
|
------- -----------
|
|
CommandButton Push button that triggers a Click event.
|
|
Label Static text label.
|
|
TextBox Single-line text input field.
|
|
TextArea Multi-line text editor.
|
|
CheckBox On/off checkbox.
|
|
OptionButton Radio button (mutually exclusive within a group).
|
|
ListBox Scrollable list of items.
|
|
ComboBox Drop-down combo box.
|
|
DropDown Simple drop-down list.
|
|
PictureBox Canvas for drawing and images.
|
|
Frame Grouping container with a labeled border.
|
|
VBox Vertical layout container.
|
|
HBox Horizontal layout container.
|
|
WrapBox Flow layout container that wraps items to the next row.
|
|
Splitter Resizable split between two child panes.
|
|
ScrollPane Scrollable container for large content.
|
|
TabStrip Tabbed container with multiple pages.
|
|
ListView Multi-column list with headers.
|
|
TreeView Hierarchical tree control.
|
|
ProgressBar Progress indicator bar.
|
|
HScrollBar Horizontal slider/scrollbar.
|
|
SpinButton Numeric up/down spinner.
|
|
Line Horizontal or vertical separator line.
|
|
Spacer Invisible spacing element for layout.
|
|
Timer Non-visual timer that fires periodic events.
|
|
Toolbar Toolbar container for buttons.
|
|
StatusBar Status bar at the bottom of a form.
|
|
Terminal ANSI terminal emulator control.
|
|
Data Data control for binding to a database.
|
|
DBGrid Data-bound grid for displaying database query results.
|
|
.endtable
|
|
|
|
Image and ImageButton controls are not in the Toolbox; they can still be written into a .frm file by hand and are then edited in the Properties panel like any other control.
|
|
|
|
.link ide.designer Form Designer
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.debugger
|
|
.title Debugger
|
|
.toc 1 Debugger
|
|
.index Debugger
|
|
.index Breakpoints
|
|
.index Stepping
|
|
.index Debug Mode
|
|
|
|
.h1 Debugger
|
|
|
|
The DVX BASIC IDE includes a full interactive debugger. The debugger has three states:
|
|
|
|
.table
|
|
State Description
|
|
----- -----------
|
|
Idle No program loaded or running.
|
|
Running The program is executing.
|
|
Paused Execution is paused at a breakpoint or step point. The IDE is fully interactive -- you can inspect and change variables, set or clear breakpoints, step, continue, or stop.
|
|
.endtable
|
|
|
|
.h2 Starting a Debug Session
|
|
|
|
.list
|
|
.item Shift+F5 (Debug) -- compiles the project and starts execution in debug mode. Breakpoints are active but execution does not pause at the first statement.
|
|
.item F8 (Step Into) -- if idle, starts a debug session and breaks at the first statement.
|
|
.item F5 (Run) -- compiles and runs without the debugger. No breakpoints are active. If already paused, resumes execution with debugging disabled.
|
|
.endlist
|
|
|
|
.h2 Breakpoints
|
|
|
|
.h3 Setting Breakpoints
|
|
|
|
.list
|
|
.item Press F9 to toggle a breakpoint on the current editor line.
|
|
.item Click in the line number gutter to toggle a breakpoint on that line.
|
|
.endlist
|
|
|
|
.h3 Breakpoint Validation
|
|
|
|
Not every line can have a breakpoint. The IDE validates the line content and silently refuses to set breakpoints on:
|
|
|
|
.list
|
|
.item Blank lines
|
|
.item Comment lines (' or REM)
|
|
.item SUB and FUNCTION declaration lines
|
|
.item END SUB and END FUNCTION lines
|
|
.endlist
|
|
|
|
.h3 Breakpoint Storage
|
|
|
|
Each breakpoint records the file it belongs to, the line number within that file, and the procedure name (Object.Event). Breakpoints are stored in the project and survive compilation.
|
|
|
|
.h3 Visual Indicators
|
|
|
|
.list
|
|
.item Breakpoint lines show a red dot in the gutter.
|
|
.item The current debug line (when paused) has a yellow background.
|
|
.endlist
|
|
|
|
.h3 Breakpoint Adjustment on Edit
|
|
|
|
Breakpoints follow their statements when lines are added, removed, joined, split or pasted. A breakpoint whose line is deleted is removed.
|
|
|
|
.h2 Stepping
|
|
|
|
.table
|
|
Action Shortcut Behavior
|
|
------ -------- --------
|
|
Step Into F8 Execute one statement. If the statement is a SUB/FUNCTION call, step into it.
|
|
Step Over Shift+F8 Execute one statement. If the statement is a SUB/FUNCTION call, execute the entire call and break at the next line in the current scope.
|
|
Step Out Ctrl+Shift+F8 Run until the current SUB/FUNCTION returns to its caller.
|
|
Run to Cursor Ctrl+F8 Run until execution reaches the line under the cursor.
|
|
.endtable
|
|
|
|
.h2 Debug Run Behavior
|
|
|
|
When a program is running under the debugger:
|
|
|
|
.list
|
|
.item The program runs in short cooperative slices so the IDE remains responsive.
|
|
.item When the program hits a breakpoint, execution pauses immediately. The IDE switches to Code View, navigates to the breakpoint line, highlights it in yellow, and opens the Locals and Call Stack windows if they are not already visible.
|
|
.item While paused, you can inspect variables in Locals and Watch, evaluate expressions in the Immediate window, assign new values to variables, toggle breakpoints, step, continue, or stop. A pause in module-level code works the same way as a pause in an event handler.
|
|
.item Resuming (F5, Shift+F5, or any Step command) returns the program to Running state.
|
|
.endlist
|
|
|
|
.h2 Stopping
|
|
|
|
Press Esc or click the Stop toolbar button at any time to halt execution. The program is terminated, the debugger returns to Idle, and the IDE restores any designer or code windows that were hidden at the start of the run.
|
|
|
|
.link ide.debug.locals Locals Window
|
|
.link ide.debug.callstack Call Stack Window
|
|
.link ide.debug.watch Watch Window
|
|
.link ide.debug.breakpoints Breakpoints Window
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.debug.locals
|
|
.title Locals Window
|
|
.toc 1 Debug Windows
|
|
.toc 2 Locals Window
|
|
.index Locals Window
|
|
.index Variable Inspection
|
|
|
|
.h1 Locals Window
|
|
|
|
When the debugger pauses, the Locals and Call Stack windows are auto-opened (if not already visible). The Watch and Breakpoints windows can be opened manually from the Window menu.
|
|
|
|
Shows variables for the current execution scope. Displayed as a three-column ListView:
|
|
|
|
.table
|
|
Column Content
|
|
------ -------
|
|
Name Variable name (internal mangled names like static variable placeholders are filtered out).
|
|
Type Data type: Integer, Long, Single, Double, String, Boolean, Array, UDT. Array types show the element type (e.g., Integer()).
|
|
Value Current value. Strings are shown in quotes. Booleans as True/False. Arrays show bounds and element count (e.g., Integer(0 To 9) [10]). Uninitialized arrays show (uninitialized).
|
|
.endtable
|
|
|
|
The Locals window displays:
|
|
|
|
.list
|
|
.item Local variables of the current procedure, including its STATIC variables and the module variables it names in a SHARED statement.
|
|
.item Module-level variables. While execution is paused inside a SUB or FUNCTION, only the variables declared with DIM SHARED (or REDIM SHARED) are listed, because the procedure cannot see the others. This also applies inside a DEF FN function, although a DEF FN can read every module variable.
|
|
.item Form-scoped variables for the current form (if the program is executing within a form context), with the same SHARED rule.
|
|
.endlist
|
|
|
|
The Watch window and the Immediate window follow the same rules. The window is resizable.
|
|
|
|
.link ide.debug.callstack Call Stack Window
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.debug.callstack
|
|
.title Call Stack Window
|
|
.toc 2 Call Stack Window
|
|
.index Call Stack
|
|
.index Stack Trace
|
|
|
|
.h1 Call Stack Window
|
|
|
|
Shows the current call chain as a two-column ListView:
|
|
|
|
.table
|
|
Column Content
|
|
------ -------
|
|
Procedure Procedure name (or (module) for module-level code).
|
|
Line Line number where execution is paused (shown for the topmost frame).
|
|
.endtable
|
|
|
|
The current location is shown first, followed by each caller in the call stack (walking from the deepest frame back to the module entry point). Up to 32 frames are displayed.
|
|
|
|
.link ide.debug.watch Watch Window
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.debug.watch
|
|
.title Watch Window
|
|
.toc 2 Watch Window
|
|
.index Watch Window
|
|
.index Watch Expressions
|
|
|
|
.h1 Watch Window
|
|
|
|
Allows monitoring arbitrary expressions while debugging. The window has a text input at the top and a two-column ListView below:
|
|
|
|
.table
|
|
Column Content
|
|
------ -------
|
|
Expression The watch expression text.
|
|
Value Evaluated result (or <error> if evaluation fails). Blank when not paused.
|
|
.endtable
|
|
|
|
.h2 Adding Watch Expressions
|
|
|
|
Type an expression in the text input and press Enter. Up to 16 watch expressions can be active at once.
|
|
|
|
.h2 Watch Expression Syntax
|
|
|
|
Watch expressions support:
|
|
|
|
.list
|
|
.item Simple variable names: x, count
|
|
.item Array subscripts: arr(5), matrix(2, 3)
|
|
.item UDT field access: player.name
|
|
.item Combined: items(i).price
|
|
.item Arbitrary BASIC expressions (compiled and evaluated against the paused VM's state): x + y * 2, Len(name$)
|
|
.endlist
|
|
|
|
.h2 Editing and Deleting
|
|
|
|
.list
|
|
.item Double-click or press Enter on a watch entry to move it back into the input box for editing.
|
|
.item Press Delete to remove the selected watch expression.
|
|
.endlist
|
|
|
|
.link ide.debug.breakpoints Breakpoints Window
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.debug.breakpoints
|
|
.title Breakpoints Window
|
|
.toc 2 Breakpoints Window
|
|
.index Breakpoints Window
|
|
|
|
.h1 Breakpoints Window
|
|
|
|
Lists all set breakpoints as a three-column ListView:
|
|
|
|
.table
|
|
Column Content
|
|
------ -------
|
|
File Project file path.
|
|
Procedure Procedure name (Object.Event format, or (General)).
|
|
Line Code line number within the file.
|
|
.endtable
|
|
|
|
.list
|
|
.item Double-click a breakpoint to navigate the code editor to that location.
|
|
.item Press Delete to remove selected breakpoints (multi-select is supported).
|
|
.endlist
|
|
|
|
.link ide.debugger Debugger
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.immediate
|
|
.title Immediate Window
|
|
.toc 1 Immediate Window
|
|
.index Immediate Window
|
|
.index REPL
|
|
.index Expression Evaluation
|
|
.index Variable Assignment
|
|
|
|
.h1 Immediate Window
|
|
|
|
The Immediate window is an interactive REPL at the bottom-right of the screen. Type a line of BASIC and press Enter to evaluate it. Results appear inline below your input. Enter evaluates the line it is pressed on (a line split by Enter is joined back first); Enter on an empty line does nothing. A statement that does not finish (for example DO: LOOP) is stopped with "Error: Statement did not finish; stopped."
|
|
|
|
.h2 Expression Evaluation
|
|
|
|
If the input is not a recognized statement keyword, it is automatically wrapped in a PRINT statement. For example, typing 2 + 2 evaluates as PRINT 2 + 2 and displays 4.
|
|
|
|
You can also type full statements:
|
|
|
|
.list
|
|
.item PRINT x * 2 -- evaluate and print an expression.
|
|
.item DIM tmp As Integer -- declare a temporary variable.
|
|
.item LET x = 42 -- explicit assignment (see below).
|
|
.endlist
|
|
|
|
Parse or runtime errors are displayed inline with an Error: prefix.
|
|
|
|
.h2 Inspecting Variables While Paused
|
|
|
|
When the debugger is paused at a breakpoint, the Immediate window has access to the running program's state. Expressions like count or name$ & " test" display live values.
|
|
|
|
.h2 Assigning Variables While Paused
|
|
|
|
When paused, you can modify variables in the running program directly from the Immediate window using assignment syntax:
|
|
|
|
.code
|
|
variableName = newValue
|
|
.endcode
|
|
|
|
The optional LET keyword is also accepted:
|
|
|
|
.code
|
|
LET variableName = newValue
|
|
.endcode
|
|
|
|
Assignment works for:
|
|
|
|
.list
|
|
.item Scalar variables -- x = 42, name$ = "test", count = count + 1 (any expression is allowed on the right)
|
|
.item Array elements -- arr(5) = 100, matrix(2, 3) = 7.5
|
|
.item UDT fields -- player.score = 1000
|
|
.item Combined -- items(0).price = 9.99
|
|
.endlist
|
|
|
|
The new value is written directly into the running program's variable (local, global, or form scope). A confirmation message is displayed, and the Locals and Watch windows update automatically to reflect the change.
|
|
|
|
If the assignment target cannot be resolved (unknown variable, out-of-bounds index, wrong type), an error message is displayed.
|
|
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.output
|
|
.title Output Window
|
|
.toc 1 Output Window
|
|
.index Output Window
|
|
.index PRINT Output
|
|
.index Runtime Errors
|
|
.index Compile Errors
|
|
|
|
.h1 Output Window
|
|
|
|
The Output window is a read-only TextArea at the bottom-left of the screen. It displays:
|
|
|
|
.list
|
|
.item PRINT output -- all PRINT statement output from the running program is appended here.
|
|
.item Runtime errors -- if the VM encounters a runtime error (division by zero, out-of-bounds, etc.), the error message and line number are displayed in the output with an Error on line N: prefix.
|
|
.item Compile errors -- if compilation fails, the error message and location are shown.
|
|
.endlist
|
|
|
|
The output buffer holds up to 32,768 characters; when it is full the oldest lines are dropped. The window always shows the newest output. Use Run > Clear Output to clear it.
|
|
|
|
INPUT statements prompt the user via a modal InputBox dialog; the prompt text is also echoed to the Output window.
|
|
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.findreplace
|
|
.title Find / Replace
|
|
.toc 1 Find / Replace
|
|
.index Find
|
|
.index Replace
|
|
.index Find Next
|
|
.index Search
|
|
|
|
.h1 Find / Replace
|
|
|
|
Open with Ctrl+F (Find) or Ctrl+H (Replace). The Find/Replace dialog is modeless -- it stays open while you continue editing.
|
|
|
|
.h2 Dialog Controls
|
|
|
|
.table
|
|
Control Description
|
|
------- -----------
|
|
Find input The text to search for.
|
|
Replace checkbox + input Enable replacement mode and enter replacement text.
|
|
Scope Radio group: Function, Object, File, or Project. Default is Project.
|
|
Direction Radio group: Forward or Backward.
|
|
Match Case Checkbox: case-sensitive search.
|
|
.endtable
|
|
|
|
.h2 Buttons
|
|
|
|
.table
|
|
Button Action
|
|
------ ------
|
|
Find Next Find the next occurrence. Function scope searches the current procedure, Object scope the selected object's procedures, File scope the current file and Project scope every file. At the end of the current procedure the search wraps around to its start.
|
|
Replace Replace the current match and find the next one.
|
|
Replace All Replace all occurrences within the selected scope.
|
|
Close Close the dialog.
|
|
.endtable
|
|
|
|
.h2 Keyboard Shortcut
|
|
|
|
F3 repeats the last search (Find Next) without opening the dialog, also after the dialog was closed (then searching the whole project, ignoring case). Scope and direction chosen with the keyboard take effect like mouse clicks.
|
|
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.preferences
|
|
.title Preferences
|
|
.toc 1 Preferences
|
|
.index Preferences
|
|
.index Settings
|
|
.index Tab Width
|
|
.index Option Explicit
|
|
|
|
.h1 Preferences
|
|
|
|
Open via Tools > Preferences. Settings are saved to dvxbasic.ini in the app's config directory. The dialog has two tabs.
|
|
|
|
.h2 General Tab
|
|
|
|
.h3 Editor Section
|
|
|
|
.table
|
|
Setting Description Default
|
|
------- ----------- -------
|
|
Skip comments/strings when renaming When renaming a control or form, skip occurrences inside comments and string literals. On
|
|
Require variable declaration (OPTION EXPLICIT) When enabled, newly created projects have OPTION EXPLICIT on by default. Off
|
|
Tab width Number of spaces per tab stop. 3
|
|
Insert spaces instead of tabs When enabled, pressing Tab inserts spaces. When disabled, inserts a real tab character. On
|
|
.endtable
|
|
|
|
.h3 New Project Defaults Section
|
|
|
|
These fields set the default values for new project metadata:
|
|
|
|
.table
|
|
Field Description Default
|
|
----- ----------- -------
|
|
Author Default author name. (empty)
|
|
Publisher Default publisher/company name. (empty)
|
|
Version Default version string. 1.0
|
|
Copyright Default copyright notice. (empty)
|
|
Description Default project description (one line). (empty)
|
|
.endtable
|
|
|
|
.h2 Colors Tab
|
|
|
|
Customizes the syntax-highlighting colors used in the code editor. The left side is a list of seven color entries (Default Text, Keywords, Strings, Comments, Numbers, Operators, Types). Select an entry and adjust its red, green, and blue components using the three sliders on the right. The Preview swatch shows the current color. Changes are applied to the open editor when you click OK.
|
|
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.shortcuts
|
|
.title Keyboard Shortcuts
|
|
.toc 1 Keyboard Shortcuts
|
|
.index Keyboard Shortcuts
|
|
.index Hotkeys
|
|
.index Accelerators
|
|
|
|
.h1 Keyboard Shortcuts
|
|
|
|
.table
|
|
Shortcut Action
|
|
-------- ------
|
|
Ctrl+O Add File
|
|
Ctrl+S Save File
|
|
Ctrl+A Select All
|
|
Ctrl+X Cut
|
|
Ctrl+C Copy
|
|
Ctrl+V Paste
|
|
Ctrl+F Find
|
|
Ctrl+H Replace
|
|
Ctrl+E Menu Editor
|
|
F1 DVX BASIC Help
|
|
F3 Find Next
|
|
F5 Run
|
|
Shift+F5 Debug
|
|
Ctrl+F5 Run Without Recompile
|
|
Esc Stop
|
|
F7 Code View
|
|
Shift+F7 Design View
|
|
F8 Step Into
|
|
Shift+F8 Step Over
|
|
Ctrl+Shift+F8 Step Out
|
|
Ctrl+F8 Run to Cursor
|
|
F9 Toggle Breakpoint
|
|
Del Delete
|
|
.endtable
|
|
|
|
.link ide.changes Changes in This Release
|
|
.link ide.overview Back to Overview
|
|
|
|
.topic ide.changes
|
|
.title Changes in This Release
|
|
.toc 0 Changes in This Release
|
|
.index Changes
|
|
.index Release Notes
|
|
.index What's New
|
|
.index Migration
|
|
|
|
.h1 Changes in This Release
|
|
|
|
This release fixes a large number of problems in the language, the runtime, the controls and the IDE. Most programs keep working unchanged. The one change that needs attention in existing programs is variable scope: see Module Variables Need SHARED below.
|
|
|
|
.h2 Module Variables Need SHARED
|
|
|
|
DVX BASIC now uses the QBasic scope rules. A SUB or FUNCTION sees a variable declared at module level (including the code section of a form) only when it is declared with DIM SHARED, or named in a SHARED statement inside the procedure. Before, every module variable was visible everywhere.
|
|
|
|
.list
|
|
.item In an existing program, change DIM to DIM SHARED for every module-level variable that a SUB, FUNCTION or event handler uses.
|
|
.item Without that change such a name silently becomes a local variable of the procedure (or a compile error with OPTION EXPLICIT, or when the procedure indexes or dots it).
|
|
.item New: the SHARED statement inside a procedure, and REDIM SHARED at module level. DIM SHARED inside a procedure is a compile error.
|
|
.item CONSTs, TYPEs, procedures, forms and controls are visible everywhere as before; a DEF FN still sees every module variable.
|
|
.endlist
|
|
|
|
.link lang.declarations See: Variable Scope and SHARED
|
|
|
|
.h2 Language
|
|
|
|
.list
|
|
.item GOSUB and RETURN work inside SUB and FUNCTION: each procedure call has its own GOSUB stack. RETURN with no pending GOSUB in the procedure raises error 3 (RETURN without GOSUB); before, RETURN inside a procedure left the procedure (use EXIT SUB / EXIT FUNCTION for that).
|
|
.item Labels belong to their SUB or FUNCTION (or to the module level). GOTO, GOSUB, ON GOTO/GOSUB and ON ERROR GOTO reach only labels of the same procedure; the same label name can be used in several procedures, and a label may share a name with a variable. An undefined label, or a jump to a SUB or variable name, is a compile error. "SubName:" at the start of a line is an error instead of a silent label.
|
|
.item A CONST inside a SUB or FUNCTION is local and no longer overrides a module constant. CONST name AS type converts the literal (Integer and Long round and range-check); a string/number mismatch or an overflow is a compile error.
|
|
.item DEF FN must be defined before it is used; its free names are module variables.
|
|
.item DEFINT, DEFLNG and the other DEFtype statements also apply to parameters, STATIC variables and FUNCTION results. A typed FUNCTION converts the value assigned to it (FUNCTION F AS INTEGER with F = 2.5 returns 2). STATIC variables convert on store and their names no longer leak out of the procedure.
|
|
.item DIM a, b AS STRING, c(3) declares several variables in one statement.
|
|
.item name(...) in an expression only calls FUNCTIONs; a SUB there, or indexing a scalar or CONST, is a compile error.
|
|
.item A FUNCTION can be called as a statement (F 3), discarding its result.
|
|
.item DECLARE must match the definition's BYVAL and OPTIONAL flags too.
|
|
.item SWAP and GET #n, , arr(i) evaluate each subscript exactly once. A BYREF argument written as an expression such as arr(i) + 1 is passed by value.
|
|
.item Numeric literals: an Integer/Long suffix on a literal with a fraction or exponent rounds (1E3% is 1000); -32768% and -2147483648& are accepted; 1. is a valid literal; an over-long literal is an error.
|
|
.item DATA: unquoted items are raw text up to the next comma, colon, comment or end of line.
|
|
.item READ, INPUT, INPUT # and LINE INPUT # accept array elements and TYPE fields; PRINT #n, alone writes an empty line.
|
|
.item PRINT USING: ; and , both separate values, and a trailing ; or , suppresses the newline.
|
|
.item More than 8 array dimensions, or an LBOUND/UBOUND dimension outside 1..8, is a compile error.
|
|
.item A missing END SUB, END FUNCTION, END TYPE or END DECLARE is a compile error.
|
|
.item FOR: a constant fractional STEP with an Integer or Long counter is a compile error, and a computed STEP is rounded to the counter's type. A fractional STEP no longer turns a Single counter into a Double.
|
|
.item DECLARE LIBRARY arguments are always passed by value, converted to the declared parameter type (a Single parameter receives a Single).
|
|
.item Name(idx).Member works with any member name (including keywords such as Name and Text), with method calls and in chains; Me.Method (x) is a method call.
|
|
.item Compile errors read "Line N, Col C: message".
|
|
.item New: COMMAND$ returns the arguments the program was started with (for example the document it was opened with), and COMMAND$(n) returns the nth argument without its quotes. The DVX programs that open documents (Notepad, Image Viewer, Icon Editor, Resource Editor, Help Editor) open the file named there when they start. In the IDE, set the arguments under Project Properties. A program that uses COMMAND$ does not run on an older DVX.
|
|
.item A SUB or FUNCTION may use at most 64 local slots (parameters, local variables and hidden temporaries). More is a compile error "Too many local variables in X (n, limit is 64)" instead of a runtime error 9; READ and INPUT # into many array elements no longer use a slot per target.
|
|
.item SHARED naming a variable that does not exist at module level creates it there; in a form's code it becomes a variable of that form, not a program-wide one.
|
|
.endlist
|
|
|
|
.h2 Runtime
|
|
|
|
.list
|
|
.item Nested BYREF parameters reach the original variable or array element.
|
|
.item ON ERROR is per procedure. A procedure called from a handler can trap its own errors, returning from a procedure that only installed a handler leaves the caller's ERR alone, and an error inside a running handler passes to the caller's handler.
|
|
.item RESUME NEXT after an error in an IF/ELSEIF/WHILE/DO/LOOP condition skips the block or leaves the loop; after an error in a FOR statement the loop is skipped; after an error in the SELECT CASE expression the whole SELECT CASE block is skipped; after an error in a CASE test that test counts as false and the next value or CASE is tried; after an error in an ON selector no branch is taken.
|
|
.item New error numbers: 3 RETURN without GOSUB, 14 Out of string space, 28 Out of stack space (was reported as 7), 63 Bad record number, 91 Object variable not set. ERR is a Long, and ERROR n reports the standard message for known numbers.
|
|
.item Using a property or method (or Show, Hide, Unload) on a value that is not a form or control raises error 91 instead of doing nothing.
|
|
.item EXP, ^ and other math that leaves the numeric range raise error 6 (Overflow); an undefined result raises error 5.
|
|
.item INT, FIX and SGN return an Integer (Long or Double when needed); RND returns a Double and follows QBasic (RND(0) repeats the last number, a negative argument reseeds). RANDOMIZE with a negative or very large seed, and RND with a very large negative argument, seed predictably (the seed is taken modulo 2^32), so the sequence for a negative RANDOMIZE seed may differ from before. -x of the most negative Integer or Long widens like 0 - x.
|
|
.item INSTR follows OPTION COMPARE TEXT. INSTR and the MID$ statement reject a start below 1 (error 5); MID$ with a length of 0 replaces nothing.
|
|
.item PRINT # writes a space after numbers, as PRINT does. PRINT USING and FORMAT$ show a value too wide for the field in scientific notation.
|
|
.item SEEK on a RANDOM file works in records (statement and function); a position below 1 is error 63. PUT of a value longer than the record length raises error 59 before writing anything.
|
|
.item SLEEP keeps the desktop and the program's forms running, SLEEP 0 just processes events, and closing the program ends the sleep.
|
|
.item DIR$ returns only files. GETATTR and SETATTR on a missing file raise error 53; SETATTR raises 75 when it cannot change the attributes.
|
|
.item IniRead and IniWrite use the same INI reader as the DVX system settings. IniWrite keeps the text of every other line (of any length) unchanged, ends every line of the saved file with CR LF, and raises error 75 when it cannot read the existing file or write the new one (a write failure used to be ignored); a failed write leaves the old file intact. IniRead no longer finds keys in the tail of a long line, and keys above the first section header are read with section "". Section names are matched with surrounding blanks ignored.
|
|
.item VAL keeps the magnitude of very long digit strings. Running out of memory while building a string raises error 14.
|
|
.item REDIM PRESERVE of a TYPE array keeps the existing elements.
|
|
.item Appending to a String variable with s = s + x or s = s & x no longer copies the whole string each time, so building long strings in a loop is much faster. When x is InputBox$, MsgBox, CreateForm, CreateControl or Shell, s is still read before x runs (left to right).
|
|
.item Programs compiled with an older release must be rebuilt. A program whose procedure table records more than 64 locals for a procedure is refused when it is loaded.
|
|
.endlist
|
|
|
|
.h2 Forms and Controls
|
|
|
|
.list
|
|
.item A reference to a removed control or to a control of an unloaded form raises an "unknown control" runtime error. CreateControl with a parent that is not a container on the same form raises "CreateControl: invalid parent".
|
|
.item SetEvent works on forms (Me) and menu items; a handler without parameters is called without the event's arguments.
|
|
.item Form.Visible = True/False behaves exactly like Show/Hide, but only on a real change: Visible = True on a form that is already shown does nothing (a modal form stays modal), and on a form that has no window it is ignored. MinWidth and MinHeight read back the value that was set. Size properties are limited to 0..32767.
|
|
.item Disabling a container (for example Frame.Enabled = False) blocks mouse and keyboard input to every control inside it (also inside a disabled ScrollPane or Splitter), and SetFocus on such a control does nothing.
|
|
.item OptionButton.Value is a read/write Boolean (True = selected); the button's index is the new read-only OptionIndex. Setting Value raises no Click.
|
|
.item HScrollBar has Min and Max properties. SpinButton's RealMode uses the range set with SetRange. PictureBox has read-only ImageWidth and ImageHeight.
|
|
.item ListBox SetItems "" empties the list, and every | separates items. ListView SetColumns has no length limit. TreeView Clear resets scrolling. TextArea FindNext finds a match that starts at the cursor, and the new SetCursor method moves the caret without selecting.
|
|
.item TabStrip/TabControl: a negative tab index selects the first tab and an index past the end the last one.
|
|
.item The mouse wheel over a DBGrid scrolls the rows without moving the current record, and over a Terminal scrolls its history locally.
|
|
.item .frm files: End followed by blanks or a comment (also End'comment) closes its block while End followed by a word does not, in the compiler, the build and the release renamer exactly as in the loader, Begin followed by a tab is accepted, Enabled = False on popup-menu items is applied, properties after a nested child's End apply to the parent, and Layout on a control that is not a container is reported.
|
|
.item Include libraries: sql.bas, comm.bas and commdlg.bas take and return Long (SQLFieldInt and SQLAffected no longer wrap above 32767); resource.bas string functions are declared AS STRING. CommHandshake takes an optional passphrase, and the new CommSetPlain accepts unencrypted data on a channel.
|
|
.item commdlg.bas functions are renamed to match the other include libraries: basFileOpen is now DlgFileOpen$, basFileSave is DlgFileSave$, basInputBox2 is DlgInputBox$, basInputCancelled is DlgInputCancelled, basChoiceDialog is DlgChoice, basIntInput is DlgIntInput and basPromptSave is DlgPromptSave. The old names are gone; programs that use them must be updated and rebuilt.
|
|
.item New in comm.bas: CommRecvEncrypted(handle, channel) returns True when every byte the last CommRecv$ on that channel returned arrived encrypted and authenticated (also when it returned nothing), and False when any arrived unencrypted (before CommHandshake or on a CommSetPlain channel).
|
|
.item KeyDown: Shift, Ctrl or Alt with F1-F12, and Alt with Home, End, PgUp, PgDn, Ins, Del and the arrow keys, report the plain key's KeyCode with the modifier in Shift, even when the modifier is released before the program sees the key.
|
|
.item Data control: while its Validate handler runs, MoveFirst, MoveLast, MoveNext, MovePrevious, AddNew, Refresh and Update on the same Data control are ignored (they used to validate the same record again without end); Delete is allowed. Only unloading the Data control itself from Validate or Reposition stops the operation that fired it; removing other controls does not.
|
|
.item Data control: writing a field back with the value it already has is not an edit, so leaving a bound control no longer fires Validate. With a SELECT query as RecordSource, edits are dropped when the current record changes. Update and Delete still find a record whose key is a number stored without a declared column type, or is NULL, when the key names exactly one record; Delete keeps the record shown when the database row could not be deleted.
|
|
.item DBGrid re-sorts and re-measures its columns when the Data control's records change (Refresh, AddNew, Delete or an edit), keeping the chosen sort column, and not on a plain record move.
|
|
.item Image and ImageButton: Picture = "" clears the picture (Picture then reads back ""); a file that cannot be loaded leaves the picture and Picture unchanged. A disabled Image keeps its transparent color transparent.
|
|
.item Timer: a Timer whose handler shows a modal dialog no longer fires a second time from inside that dialog.
|
|
.item TextArea: the horizontal scroll bar appears as soon as the longest line fills the visible width, and the caret stays visible while typing at the right edge.
|
|
.item Terminal: pasting with Ctrl+V returns the view to the live screen and sends the text in small pieces.
|
|
.item ListBox and ListView: changing the items while an item is being dragged ends the drag.
|
|
.item TabControl: switching tabs closes an open drop-down list only when it belongs to a control on the page being hidden. A Label on a Toolbar is drawn on the toolbar's color.
|
|
.item Compile errors from the command-line compiler name the file and line. A .frm without a Begin Form line is an error. A release build that runs out of memory while renaming names fails instead of producing a broken program.
|
|
.item A form shown modal has no minimize gadget.
|
|
.item Menu items accept only Name (read-only), Checked and Enabled in code; Caption, Visible and RadioCheck are design-time settings, and using them in code is a compile error in the IDE.
|
|
.endlist
|
|
|
|
.h2 IDE
|
|
|
|
.list
|
|
.item Immediate window: Enter evaluates the line it is pressed on, assignments accept any expression, and a statement that does not finish is stopped.
|
|
.item Output window: always shows the newest output and drops the oldest lines when full; Output Window to Log also logs errors.
|
|
.item Find/Replace: Object and File scopes search only that object or file; F3 works after the dialog is closed.
|
|
.item Edit commands act on the window last worked in (designer control or text window). A pasted control keeps all its properties.
|
|
.item The code editor never drops text outside the shown procedure; only untouched generated event handlers are removed.
|
|
.item Files are saved exactly as written, with LF line endings, through a temporary file (for FORM1.FRM, FORM1.$FR, with the old file kept as FORM1.~FR until the save is complete; your own name.BAK is never touched); carriage returns are removed when files are loaded. Don't Save discards Project Properties changes too. A project file may hold up to 64 KB of text not counting carriage returns; a file of twice that size or more is refused without being read.
|
|
.item Debugger: while paused inside a SUB or FUNCTION, Locals and Watch show only the variables the procedure can see (its locals, its STATIC and SHARED names, and DIM SHARED module variables), and STATIC variables are now listed.
|
|
.item Compile-time checks of control properties and methods use the control on the form whose code is being compiled, so a control name used for different control types on different forms is checked too.
|
|
.item Form designer: Image and ImageButton are no longer in the Toolbox, controls nest at most 15 levels, Delete removes a control with its contents, AutoSize matches the runtime, TabStrip TabIndex and the form's ContextMenu are kept on save, control arrays inside containers no longer duplicate controls, and a control keeps any number of design-time properties.
|
|
.item Error and debugger line numbers in a form's code match the editor exactly (the indentation of the first code line is kept).
|
|
.item Menu Editor: at most 15 levels, the close box cancels, and only real renames rewrite event handlers.
|
|
.item Project Properties: Description is a single line.
|
|
.item A Sub or Function whose name already exists (typed or pasted) stays its own procedure, and the compiler reports the duplicate; before, it was moved into (General).
|
|
.item Breakpoints and the caret follow lines that the editor moves when it tidies a procedure (blank lines after End Sub, text typed outside a Sub, a deleted Sub line); a breakpoint whose line disappears is removed.
|
|
.item Immediate window: output leaves room for typing, and Enter in a completely full window evaluates nothing and says so in the status bar.
|
|
.item Debugger: a breakpoint reached while a stopped program is unwinding no longer pauses it.
|
|
.item The title bar's * also shows for a form changed in the designer but not yet saved.
|
|
.item Form designer: a property value may be as long as a full .frm line (511 characters); a value too long for the line it is saved on (deeply nested controls) stops the save with "A property value is too long to save at its position in the form". Making a container part of a control array keeps its contents. Only one OptionButton per container keeps Value = True: setting it on one (in the property grid or by pasting a selected one) clears the others.
|
|
.endlist
|
|
|
|
.link ide.overview Back to Overview
|
|
|
|
.hr
|
|
|
|
DVX BASIC 1.0 -- Copyright 2026 Scott Duensing
|