Search found 42 matches

by frank
Fri May 23, 2025 2:27 pm
Forum: Development
Topic: Stage 0132 More flexibility to the Switch statement
Replies: 0
Views: 653

Stage 0132 More flexibility to the Switch statement

Sharp BASIC's switch statement 'when' has been renamed to 'by' and extended with the directives 'next' and 'done'. Previously, the directive 'fall' tested the next branch and executed it if the condition was met. This behavior has changed. Now, the fall directive executes the next branch no matter ...
by frank
Fri May 23, 2025 6:32 am
Forum: Development
Topic: Stages 0125 - 0131: Reals, Arrays, etc...
Replies: 0
Views: 710

Stages 0125 - 0131: Reals, Arrays, etc...

Due to lack of time, it's been two years since the last update on the compiler. At this stage the left, mid and right string functions have been improved and optimized. Traditional BASIC functions MKx and CVx have been added: cvd, cvi, cvl, cvs, mkd, mki, mkl, mks. Basic support for real numbers (re...
by frank
Tue Oct 03, 2023 8:23 am
Forum: Language Discussion
Topic: A few questions...
Replies: 1
Views: 198902

Re: A few questions...

1. No, unfortunately due to lack of time the first beta of the compiler has been delayed. 2. The compiler is currently being developed in FreeBASIC/C and NASM. But eventually SB should become a self-hosting compiler. 3. Pascal is a very structured language, but somewhat verbose and inconsistent at t...
by frank
Sun Jul 23, 2023 9:24 am
Forum: Development
Topic: Stage 119-124: Records, Tables and Structures
Replies: 0
Views: 187017

Stage 119-124: Records, Tables and Structures

During the previous stage, full support for records was implemented. See the documentation . From a compiler perspective, records are also at the base of structures and tables. Structures or user-defined types (UDT's) are well-known in many programming languages and during this stage, support for st...
by frank
Wed Jul 12, 2023 3:47 pm
Forum: Development
Topic: Stage 113-118: UDTs and shortcuts (with statement)
Replies: 0
Views: 79115

Stage 113-118: UDTs and shortcuts (with statement)

Further support has been added for buffer types and records. Sharp BASIC now supports functions of a user-defined type (currently fixed-length records, but structures will be fully supported too). See the documentation about functions . Implementation of user-defined types usually goes hand in hand ...
by frank
Fri Jun 30, 2023 1:00 pm
Forum: Development
Topic: Stage 110-112: buffer type revisited
Replies: 0
Views: 80549

Stage 110-112: buffer type revisited

A buffer type was introduced last year, but it was limited to access by pointer. Some features have been added to make it easier and more flexible to work with buffers as placeholders for data: - the function cbuf copies data types to a buffer. buffer = cbuf(string) whereby an optional parameter can...
by frank
Tue Jun 20, 2023 10:16 am
Forum: News
Topic: Documentation
Replies: 0
Views: 188763

Documentation

The documentation forum has been removed. Instead, you are encouraged to check out the documentation wiki: https://sharpbasic.com/wiki/doku.php, the central place where documentation is being updated.
by frank
Tue Jun 20, 2023 6:47 am
Forum: Development
Topic: Stage 109: File handling
Replies: 0
Views: 79357

Stage 109: File handling

Support for file handling is being added to the Sharp BASIC language. The first step is support for text files. In addition, support will be added for binary files and the good old random access file. With the introduction of file handling, a new datatype is added: the handle type hnd , which is use...
by frank
Thu Jun 15, 2023 6:12 am
Forum: Development
Topic: Stage 100-108: Character datatype removed (for now)
Replies: 0
Views: 79914

Stage 100-108: Character datatype removed (for now)

Due to lack of time I have not been able to work on the compiler for some time, but I intend to continue as planned. In this stage, the character datatype has been (temporarily) removed because of too much complexity in conjunction with the string datatype. Since Sharp BASIC has fixed length strings...
by frank
Wed Mar 09, 2022 7:05 pm
Forum: Development
Topic: Stage 99: For-loop and the shortcut operator
Replies: 0
Views: 83018

Stage 99: For-loop and the shortcut operator

The recent support for shortcut operators (stages 96-97) has a positive effect on the Sharp BASIC language overall. Not only did it improve the loop-statement (see stage 98), it also allowed for a for-statement with an acceptable syntax, something we've been struggling with for months. A C-like for-...