PureBasic

1 program Added 2025-10-22T12:11:42Z Model: anthropic/claude-3.5-sonnetTemp: 0.4 Evidence Report issue View issues
Aliases: pb
Provenance: commit 95da577c28 · authored 2025-10-22T14:11:42+02:00 · model anthropic/claude-3.5-sonnet

Sources mentioning this language

7 sources · pl_id: pl/purebasic
LLM (this repo) · 1PldbLinguistWikipediaHyperpolyglotRosettacodeWikidata · Q2118858

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.

Paradigmsstructured · imperative · procedural
Designed byFantaisie Software
First appeared1998
LicenseTrialware
Homepagehttp://www.purebasic.com

Extensions claimed by this language

6 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.pblinguistprimary3.8M files
.pbilinguistsecondary530.6K files
.pbwikipediaproposed3.8M files
.pbfwikipediaproposed53.7M files
.pbiwikipediaproposed530.6K files
.pbpwikipediaproposed8.5K files

Related languages

PowerBASIC (0.45)FutureBasic (0.36)PicBasic (0.29)PBASIC (0.27)PICAXE BASIC (0.26)

LLM-contributed programs

Simple Snake Game

Provenance: commit 95da577c28 · authored 2025-10-22T14:11:42+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
code.pb · license: MIT · added: 2025-10-22T12:11:42Z
Structure TSnake
  x.i
  y.i
  dx.i
  dy.i
  length.i
  List segments.TPoint()
EndStructure

Structure TPoint
  x.i
  y.i
EndStructure

#CELL_SIZE = 10
#GRID_WIDTH = 40
#GRID_HEIGHT = 30

Global snake.TSnake
Global food.TPoint

Procedure InitGame()
  snake\x = #GRID_WIDTH / 2
  snake\y = #GRID_HEIGHT / 2
  snake\dx = 1
  snake\dy = 0
  snake\length = 3
  ClearList(snake\segments())
  
  food\x = Random(#GRID_WIDTH - 1)
  food\y = Random(#GRID_HEIGHT - 1)
EndProcedure

Procedure OpenWindow()
  OpenWindow(0, 0, 0, #GRID_WIDTH * #CELL_SIZE, #GRID_HEIGHT * #CELL_SIZE, "Snake", #PB_Window_ScreenCentered)
  CreateGadgetList(WindowID(0))
EndProcedure

InitGame()
OpenWindow()

Repeat
  event = WaitWindowEvent(10)
  
  If event = #PB_Event_KeyDown
    Select EventKey()
      Case #PB_Key_Left
        If snake\dx = 0
          snake\dx = -1
          snake\dy = 0
        EndIf
      Case #PB_Key_Right
        If snake\dx = 0
          snake\dx = 1
          snake\dy = 0
        EndIf
    EndSelect
  EndIf
  
  snake\x + snake\dx
  snake\y + snake\dy
  
  StartDrawing(WindowOutput(0))
  Box(0, 0, WindowWidth(0), WindowHeight(0), RGB(0, 0, 0))
  Circle(food\x * #CELL_SIZE + #CELL_SIZE/2, food\y * #CELL_SIZE + #CELL_SIZE/2, #CELL_SIZE/2, RGB(255, 0, 0))
  ForEach snake\segments()
    Box(snake\segments()\x * #CELL_SIZE, snake\segments()\y * #CELL_SIZE, #CELL_SIZE, #CELL_SIZE, RGB(0, 255, 0))
  Next
  StopDrawing()
Until event = #PB_Event_CloseWindow

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.)

Contribute — propose a file extension

Tell us where to find evidence about PureBasic (mapped to pl/purebasic). 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/PureBasic/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Pure Data PureBrainz →