
Proudly Serving South Dakota
South Dakota Data General Business Basic
Data General Business Basic, commonly referred to as Business Basic or BBx, is a business-oriented programming language that originated from Data General Corporation in the late 1970s. It is a high-level programming language designed for developing business applications, particularly for small and medium-sized businesses. Business Basic is known for its simplicity, ease of use, and powerful database integration capabilities.
Key Features:
- Simple Syntax: Business Basic has a straightforward syntax that resembles natural language, making it easy for developers to learn and use.
- Strong Typing: It is a strongly typed language, meaning that variable types are explicitly defined and enforced during compilation.
- Database Integration: Business Basic provides built-in features for seamless integration with databases, allowing developers to easily perform operations such as data retrieval, manipulation, and storage.
- Cross-Platform Compatibility: Business Basic applications can run on various operating systems, including Data General's own DG/UX, as well as Windows, Linux, and Unix platforms.
- Modular Programming: Business Basic supports modular programming techniques, enabling developers to organize code into reusable modules for better maintainability and scalability.
- GUI Development: It offers capabilities for building graphical user interfaces (GUIs), allowing developers to create user-friendly applications with interactive interfaces.
Business Basic has evolved over the years, with various vendors offering their own implementations and extensions of the language. While it may not be as widely used today as other programming languages, it still has a presence in certain industries and legacy systems where it has been historically employed.
South Dakota Business Basic Commands
Data Types and Variables
- DECLARE: Declares variables.
- LET: Assigns values to variables.
- READ: Reads input from a file or terminal.
Control Structures
- IF...THEN...ELSE: Conditional branching.
- DO...LOOP: Iterative loops.
- GOTO: Unconditional branching.
String Handling
- LEFT$, RIGHT$, MID$: Extract substrings.
- CONCAT$: Concatenates strings.
- STR$: Converts numbers to strings.
File Operations
- OPEN: Opens files for input or output.
- READ: Reads data from a file.
- WRITE: Writes data to a file.
Database Access
- SELECT: Retrieves data from a database table.
- INSERT: Inserts data into a database table.
- UPDATE: Updates data in a database table.
Subroutines and Functions
- SUB: Defines subroutines.
- FUNCTION: Defines functions.
- RETURN: Exits a subroutine or function.
Error Handling
- ON ERROR: Defines error handling routines.
- ERROR: Raises an error condition.
- RESUME: Resumes execution after an error.
South Dakota Math Commands in Business Basic
Arithmetic Operations
- +: Addition
- -: Subtraction
- *: Multiplication
- /: Division
- MOD: Modulus (remainder of division)
Math Functions
- ABS(x): Absolute value
- INT(x): Integer part of a number
- ROUND(x): Rounds to nearest integer
- SQRT(x): Square root
- EXP(x): Exponential function
- LOG(x): Natural logarithm
- LOG10(x): Base-10 logarithm
- SIN(x): Sine
- COS(x): Cosine
- TAN(x): Tangent
Constants
- PI: Value of pi
- E: Value of Euler's number (e)
South Dakota Screen Manipulation in Business Basic
Clearing the Screen
To clear the screen, you can use terminal control commands or clear specific rows and columns in a display file.
10 PRINT CHR$(27) + "[2J" ' Clear screen using terminal control command 20 REM Clear specific rows and columns in a display file 30 DISPLAY CLEAR
Writing to Specific Rows and Columns
To write to specific rows and columns on the screen, you can position the cursor using terminal control commands or specify row and column coordinates in a display file.
40 REM Write to specific rows and columns using terminal control commands 50 PRINT CHR$(27) + "[1;1H" ' Move cursor to row 1, column 1 60 PRINT "Hello, World!" 70 REM Write to specific rows and columns in a display file 80 DISPLAY AT(10, 20) "Hello, World!" ' Write "Hello, World!" at row 10, column 20
South Dakota Calling an Operating System Command in Business Basic
To call an operating system command in Business Basic, you can use the SHELL
statement followed by the command you want to execute.
10 SHELL "DIR" ' Executes the DIR command (Windows) or ls command (Unix/Linux)
The SHELL
statement executes the specified command in the context of the operating system. You can use it to run any command that is available in your operating system's command line interface.
South Dakota Using RFORM in Business Basic
The RFORM
statement allows you to format output based on a format string. You can specify placeholders in the format string to represent where data should be inserted, and provide corresponding data values to fill those placeholders.
10 A$ = "John" 20 B$ = "Doe" 30 C = 25 40 RFORM "Name: %1 %2, Age: %3", A$, B$, C
In this example, the format string "Name: %1 %2, Age: %3" contains three placeholders: %1, %2, and %3. These placeholders will be replaced with the values of variables A$, B$, and C respectively when the RFORM
statement is executed.
So, if the values of A$, B$, and C are "John", "Doe", and 25 respectively, the output of the RFORM
statement will be "Name: John Doe, Age: 25".
South Dakota Printing to a Printer in Business Basic
Printer Control Commands
You can use printer control commands to send data directly to a printer device. This method allows you to control the formatting and layout of the printed output.
10 OPEN "LST:" FOR OUTPUT AS #1 ' Open printer device for output 20 PRINT #1, "Hello, Printer!" ' Print to printer 30 CLOSE #1 ' Close printer device
Printer Files
Alternatively, you can write data to a printer file and then send the file to the printer using operating system commands.
40 OPEN "PRINTER.TXT" FOR OUTPUT AS #2 ' Open printer file for output 50 PRINT #2, "Hello, Printer!" ' Write data to printer file 60 CLOSE #2 ' Close printer file 70 SHELL "COPY PRINTER.TXT LPT1" ' Send printer file to printer (Windows)
South Dakota Making an Audible Beep in Business Basic
To make an audible beep in Business Basic, you can use the BEEP
statement.
10 BEEP
The BEEP
statement emits a beep sound from the computer's speaker. You can use it to provide audible feedback to the user or to signal certain events in your program.
Need Assistance?
Ever have an idea about a product or service but lack the ability to develop that idea? Are you looking for a reliable person/firm to build your software? Perhaps you are in need of someone to manage projects and teams?
Word of Mouth
[ Latest 10 ]