BPP+ Preprocessor features¶
BPP+ preprocessor features in .bpp files.
What is BPP+?¶
BPP+ is a preprocessor that extends BASIC v2 with labels, scopes, and includes.
See BPP+ Preprocessor documentation for language specification and compilation.
Labels¶
Labels provide symbolic names for control flow targets, replacing numeric line references:
main:
gosub init
gosub loop
end
init:
print "{clr}"
return
Label definitions: main:, init:
Label references: gosub init, goto loop
See BPP+ Preprocessor - Symbol resolution.
Scopes¶
Scopes provide hierarchical namespaces for organizing related labels:
screen: {
init:
poke 53280,0
return
clear:
print "{clr}"
return
}
main:
gosub screen.init
gosub screen.clear
Scope declarations: screen: {
Scope delimiters: { and }
Qualified references: screen.init
See BPP+ Preprocessor - Scope hierarchies.
Include directives¶
!include source "lib/screen.bpp"
!include data "charset.bin"
ui: {
!include source "ui-elements.bpp"
}
Highlights the !include keyword, type specifiers (source/data), and file paths.
See BPP+ Preprocessor - Include directives.
Statement chaining¶
print_header:
print "{clr}";\
print "{wht}System v1.0";\
print "{down}{down}";\
return
Highlights the backslash (\) continuation character.
See BPP+ Preprocessor - Statement chaining.
Comments¶
rem BASIC comment
; BPP+ comment
Highlights both rem and ; comment styles.
See BPP+ Preprocessor - Lexical structure.
Blitz! compiler control¶
:: print "This line will not be compiled by Blitz!"
The :: prefix prevents Blitz! compilation, forcing runtime interpretation.
See BPP+ Preprocessor - Blitz! compiler.
String tokens¶
print "{clr}{wht}Text"
print "{10 space}"
print "{a-z}"
Highlights token delimiters, content, repetition syntax, and ranges.
See BPP+ Preprocessor - PETSCII control characters.
PETSCII character conversion¶
BPP+ automatically converts PETSCII characters to ASCII equivalents during preprocessing:
£(pound sign, 0x5C) →\(backslash)←(left arrow, 0x5F) →_(underscore)↑(up arrow, 0x5E) →^(caret)
These conversions handle files created with C64 editors or PETSCII-aware editors.
C*Base extensions:
£ and ← also serve as C*Base MCI commands and Prof. Plum extensions. The ↑ character is purely for PETSCII conversion - it is NOT a C*Base command.
See Extension symbols for highlighting behavior and C*Base extension details.
See BPP+ Preprocessor - PETSCII character conversion.
Code snippets¶
See Code snippets.
File types¶
.bpp- BPP+ enhanced source files (full highlighting).bas- Standard BASIC v2 files (BASIC highlighting only)