- Compiler: PP → Lexer → Parser → Analyzer → Gengo pipeline - Parser: 232/236 (98%) Harbour compatibility, registry-based dispatch - RTL: 351 Harbour-compatible functions - RDD: DBF/NTX/CDX engines with Rushmore bitmap optimization - Go Interop: IMPORT + pkg.Func() + obj:Method() with FastPath (15M calls/sec) - HB_FUNC API: Full Harbour C API compatible Go bridge - Concurrency: SPAWN/LAUNCH/GOROUTINE, <-, WATCH, PARALLEL FOR, ASYNC/AWAIT - Extensions: Multi-return, DEFER, Slice, f-string, Nil-safe ?:, CONST - Macro Compiler: Runtime AST parsing and evaluation - Debugger: TUI debugger with source display, breakpoints, stepping - FRB: Native + Pcode dual mode runtime binary - Tests: 13 packages ALL PASS Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
57 lines
1.2 KiB
Plaintext
57 lines
1.2 KiB
Plaintext
// RDD test — simple CREATE + USE + APPEND + INDEX ON + SEEK
|
|
FUNCTION Main()
|
|
LOCAL i, aStruct
|
|
|
|
? "=== RDD Test ==="
|
|
|
|
// 1. Create
|
|
? "1. dbCreate..."
|
|
aStruct := {{"ID","N",6,0}, {"NAME","C",20,0}, {"CITY","C",15,0}}
|
|
dbCreate("rddtest", aStruct)
|
|
? " Created."
|
|
|
|
// 2. Open and append
|
|
? "2. USE + APPEND..."
|
|
USE "rddtest"
|
|
FOR i := 1 TO 20
|
|
APPEND BLANK
|
|
FieldPut(1, i)
|
|
FieldPut(2, "Name_" + Str(i))
|
|
FieldPut(3, "City_" + Str(i % 5))
|
|
NEXT
|
|
? " RecCount:", RecCount()
|
|
|
|
// 3. Index
|
|
? "3. INDEX ON NAME..."
|
|
INDEX ON NAME TO rddtest_idx
|
|
? " Index created."
|
|
|
|
// 4. Navigate
|
|
? "4. First 5 in index order:"
|
|
GO TOP
|
|
FOR i := 1 TO 5
|
|
IF !Eof()
|
|
? " ", FieldGet(1), FieldGet(2)
|
|
SKIP
|
|
ENDIF
|
|
NEXT
|
|
|
|
// 5. Seek — partial key match (Harbour compatible)
|
|
? "5. SEEK 'Name_1' (partial)..."
|
|
SEEK "Name_1"
|
|
? " Found:", Found(), "RecNo:", RecNo()
|
|
IF Found()
|
|
? " Name:", FieldGet(2)
|
|
ENDIF
|
|
|
|
? "6. SEEK 'Name_5' (partial)..."
|
|
SEEK "Name_5"
|
|
? " Found:", Found(), "RecNo:", RecNo()
|
|
IF Found()
|
|
? " Name:", FieldGet(2)
|
|
ENDIF
|
|
|
|
USE
|
|
? "=== Done ==="
|
|
RETURN NIL
|