Search found 40 matches

by frank
Tue Oct 03, 2023 8:23 am
Forum: Language Discussion
Topic: A few questions...
Replies: 1
Views: 7795

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: 12654

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: 10372

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: 10616

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: 14265

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: 10496

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: 10597

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: 12665

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-...
by frank
Tue Mar 08, 2022 9:59 am
Forum: Development
Topic: Stage 98: Loop statement does it
Replies: 0
Views: 11811

Stage 98: Loop statement does it

The new shortcut operators (see stages 96-97) allow for a more flexible and readable loop statement, so flexible in fact that Sharp BASIC's count statement (aka the for-loop) has almost become superfluous and certainly "ugly" (keep in mind this is still pre-alpha stage). Consider the follo...
by frank
Mon Mar 07, 2022 7:49 pm
Forum: Development
Topic: Stage 97: Shortcut Operators :+, :-, :*, :/
Replies: 0
Views: 11597

Stage 97: Shortcut Operators :+, :-, :*, :/

Next to the increment (:++) and decrement (:--) operators (see stage 96), Sharp BASIC supports the 'shortcut' assignment operators :+ (addition), :- (subtraction), :* (multiplication) and :/ (division). Example: dim a:int=5; main do a:+5; ' equivalent to "a = a + 5;" print(a); ' 10 a:-3; '...