Skip to main content

Posts

Showing posts with the label Learn Programming

UNLOCK Statement

UNLOCK Statement Purpose: To release locks that have been applied to an opened file. This is used in a multi-device environment, often referred to as a network or network environment. Syntax: UNLOCK [ # ] n [,[ record number ] [ TO record number ]] Comments: n is the number that was assigned the file as it was originally numbered in the program. record number is the number of the individual record that is to be unlocked. Or, if a range of records are to be unlocked, record number designates the beginning and ending record of the specified range. The range of legal record numbers is 1 to 2 32 -1. The limit on record size is 32767 bytes. The record range specified must be from lower to (the same or) higher record numbers. If a starting record number is not specified, the record number 1 is assumed. If an ending record number is not specified, then only the specified record is unlocked. The following are legal UNLOCK statements: UNLOCK # n unlocks the entire file n UNLOCK # n , X unlo...

AUTO Command | GW-BASIC

AUTO Command Purpose: To generate and increment line numbers automatically each time you press the RETURN key. Syntax: AUTO [ line number ][,[ increment ]] AUTO .[,[ increment ]] Comments: AUTO is useful for program entry because it makes typing line numbers unnecessary. AUTO begins numbering at line number and increments each subsequent line number by increment . The default for both values is 10. The period ( . ) can be used as a substitute for line number to indicate the current line. If line number is followed by a comma, and increment is not specified, the last increment specified in an AUTO command is assumed. If AUTO generates a line number that is already being used, an asterisk appears after the number to warn that any input will replace the existing line. However, pressing return immediately after the asterisk saves the line and generates the next line number. AUTO is terminated by entering CTRL-BREAK or CTRL-C . GW-BASIC will then return to command level. Not...

ABS Function | GW-BASICS

ABS Function Purpose: To return the absolute value of the expression n . Syntax: ABS ( n ) Comments: n must be a numeric expression. Examples: PRINT ABS(7*(-5))  35 Prints 35 as the result of the action. A VIDEO TO HELP YOU IN ABS FUNCTION