BASIC

1 program Added 2025-10-22T11:40:45Z Model: anthropic/claude-3.5-sonnetTemp: 0.4 Evidence Report issue View issues
Aliases: QuickBASIC, QBasic, Visual Basic
Provenance: commit 2910f25773 · authored 2025-10-22T13:40:45+02:00 · model anthropic/claude-3.5-sonnet

Sources mentioning this language

8 sources · pl_id: pl/basic
LLM (this repo) · 1PldbLinguistPygmentsWikipediaEsolangRosettacodeWikidata · Q42979

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsnon-structured · later procedural · later object-oriented
Designed byJohn G. Kemeny · Thomas E. Kurtz
First appeared1964
Influenced byALGOL 60 · FORTRAN II · JOSS

Extensions claimed by this language

3 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.baslinguistprimary641.7K files
.baspygmentsprimary641.7K files
.baswikidataprimary641.7K files

Related languages

QBasic (0.56)QuickBASIC (0.44)Visual Basic (0.42)Visual Basic .NET (0.33)VB.NET (0.30)

LLM-contributed programs

Snake Game in QBasic

Provenance: commit 2910f25773 · authored 2025-10-22T13:40:45+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
code.bas · license: MIT · added: 2025-10-22T11:40:45Z
CLS
SCREEN 7
COLOR 2
DIM snake(1000)
snake(1) = 2000
LENGTH = 1
DIRECTION = 1
SPEED = 100
OLD = 1
SCORE = 0
PRINT "SCORE:"
LOCATE 1, 8
PRINT SCORE
FOOD = 2000
PSET (40, 12)
WHILE INKEY$ = "": WEND
WHILE key$ <> "x"
key$ = INKEY$
IF key$ = "w" THEN DIRECTION = 0
IF key$ = "s" THEN DIRECTION = 1
IF key$ = "a" THEN DIRECTION = 2
IF key$ = "d" THEN DIRECTION = 3
IF DIRECTION = 0 THEN snake(LENGTH + 1) = snake(LENGTH) - 320
IF DIRECTION = 1 THEN snake(LENGTH + 1) = snake(LENGTH) + 320
IF DIRECTION = 2 THEN snake(LENGTH + 1) = snake(LENGTH) - 1
IF DIRECTION = 3 THEN snake(LENGTH + 1) = snake(LENGTH) + 1
PSET (snake(LENGTH + 1) \ 320, snake(LENGTH + 1) MOD 320)
LENGTH = LENGTH + 1
IF snake(LENGTH) = FOOD THEN
  SCORE = SCORE + 1
  LOCATE 1, 8
  PRINT SCORE
  FOOD = INT(RND * 64000)
  PSET (FOOD \ 320, FOOD MOD 320), 4
ELSE
  PRESET (snake(OLD) \ 320, snake(OLD) MOD 320)
  OLD = OLD + 1
END IF
FOR I = 1 TO SPEED: NEXT I
WEND

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.bas/3.baspredicates[{"kind": "any", "regexes": ["\\A\\s*\\d"]}]

Contribute — propose a file extension

Tell us where to find evidence about BASIC (mapped to pl/basic). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/BASIC/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Bash: foo: No such file or directory Basic Input/Output Commands →