Search found 42 matches
- Sat Jan 01, 2022 11:05 pm
- Forum: Development
- Topic: Stages 79-80
- Replies: 0
- Views: 77625
Stages 79-80
As reference counting is being implemented (not yet finished), small changes, additions and lots of testing are done. One small addition is the bitwise not operator (~). Sharp BASIC has both logical and bitwise operators. More on this will be added to the documentation soon. The bitwise operators cu...
- Thu Dec 30, 2021 11:31 am
- Forum: Development
- Topic: Finishing string support: reference counting
- Replies: 0
- Views: 75861
Finishing string support: reference counting
Finishing string support takes longer due to the implementation of a reference count system, which will use the ownership model similar to what is proposed for the Lobster language . The advantage of this system is that the reference counting is mainly done during compile time, which should take awa...
- Tue Dec 21, 2021 7:07 pm
- Forum: News
- Topic: Syntax Highlighting
- Replies: 0
- Views: 79439
Syntax Highlighting
The forum supports syntax highlighting in the code box (button </>) for multiple languages. The default language is of course Sharp BASIC. No code definition is needed when sharing Sharp BASIC code. To share code of another language, just add the language name to the code tag, like code=ada or code=...
- Tue Dec 21, 2021 4:54 pm
- Forum: Development
- Topic: Stages 75-78
- Replies: 0
- Views: 76238
Stages 75-78
- Support added for character types chr8, chr16 and chr32. See data types in documentation. - for-loop changed to count-loop and support added for downward iteration. Keywords up and down required for iteration direction: count i up 1 to 9 do ' .. end; count i down 9 to 1 do ' .. end; - added functi...
- Sat Dec 18, 2021 2:12 pm
- Forum: Language Discussion
- Topic: Forum has syntax highlight support for different languages
- Replies: 0
- Views: 74688
Forum has syntax highlight support for different languages
The nice thing about syntax highlight support is that multiple languages can be supported. Prism supports a wide range of languages. By adding the language name to the code tag, the language tokens will be recognized. While this forum has default highlight support for Sharp BASIC, adding e.g. "...
- Fri Dec 10, 2021 10:21 pm
- Forum: Development
- Topic: Stages 71-74
- Replies: 0
- Views: 75992
Stages 71-74
Several functions have been added to the system library: - left, mid, right for string manipulation (partially implemented in stage 70) - instr (in-string) for searching a sub-string within a string, optionally with a start position - cstr (convert to string) to convert any numeric value to string, ...
- Sun Dec 05, 2021 8:29 pm
- Forum: Development
- Topic: Stage 70
- Replies: 0
- Views: 76145
Stage 70
More string functions are being implemented. As you can see from the example below, Sharp BASIC uses the same names and syntax for these functions as QBASIC / QuickBASIC did (that's not a coincidence). :o Under the hood these functions are written in assembly language for maximum performance (as is ...
- Sat Dec 04, 2021 6:17 pm
- Forum: Language Discussion
- Topic: Hello
- Replies: 9
- Views: 234434
Re: Hello
My point is that average BASIC programmer don't like == and who use this constructs like a=b=c ...no one ! I beg to differ. Expressions expecting a boolean result are plenty: dim test: bool; dim b, c: int = 10; test = b = c; ' perfectly legal test, but ambiguous with a single operator for assignmen...
- Fri Dec 03, 2021 9:26 pm
- Forum: Development
- Topic: Stages 67-69
- Replies: 3
- Views: 117042
Re: Stage 69
ahh ...i get it , so you use do / end instead of { } That's right. In the documentation the is..end and do..end blocks are explained. These blocks are used consistently in Sharp BASIC syntax. C and other languages have curly brackets {..}, which I dislike for multiple reasons. Pascal actually prece...
- Wed Dec 01, 2021 12:05 am
- Forum: Development
- Topic: Stages 67-69
- Replies: 3
- Views: 117042
Stages 67-69
In the last two weeks I've added basic :? string handling up to the point where strings can be declared, assigned, passed as parameters and even returned from functions. String functions can also pass their result directly to the result of another function. See screenshot below. At the end of this s...