PowerBASIC
1 program
Added 2026-02-07T12:00:00Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: PowerBasic, PB
Provenance: commit 3d5affe569 · authored 2026-02-07T12:08:37+01:00 · agent claude-code · model sonnet
Sources mentioning this language
5 sources · pl_id:
pl/powerbasicRelated languages
LLM-contributed programs
Fibonacci Sequence
Provenance: commit 3d5affe569 · authored 2026-02-07T12:08:37+01:00 · agent claude-code · model sonnet · WebSearch disabled
FUNCTION FibonacciIterative(n AS LONG) AS LONG
DIM a AS LONG, b AS LONG, temp AS LONG, i AS LONG
a = 0
b = 1
IF n = 0 THEN
FUNCTION = 0
EXIT FUNCTION
END IF
FOR i = 2 TO n
temp = a + b
a = b
b = temp
NEXT i
FUNCTION = b
END FUNCTION
FUNCTION PBMAIN() AS LONG
DIM result AS LONG, i AS LONG
FOR i = 0 TO 10
result = FibonacciIterative(i)
PRINT "Fibonacci(" & STR$(i) & ") = " & STR$(result)
NEXT i
WAITKEY$
FUNCTION = 0
END FUNCTION
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.)