Search found 40 matches

by frank
Tue Dec 21, 2021 7:07 pm
Forum: News
Topic: Syntax Highlighting
Replies: 0
Views: 14848

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=...
by frank
Tue Dec 21, 2021 4:54 pm
Forum: Development
Topic: Stages 75-78
Replies: 0
Views: 10728

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...
by frank
Sat Dec 18, 2021 2:12 pm
Forum: Language Discussion
Topic: Forum has syntax highlight support for different languages
Replies: 0
Views: 9918

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. "...
by frank
Fri Dec 10, 2021 10:21 pm
Forum: Development
Topic: Stages 71-74
Replies: 0
Views: 10705

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, ...
by frank
Sun Dec 05, 2021 8:29 pm
Forum: Development
Topic: Stage 70
Replies: 0
Views: 10156

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 ...
by frank
Sat Dec 04, 2021 6:17 pm
Forum: Language Discussion
Topic: Hello
Replies: 9
Views: 7111

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...
by frank
Fri Dec 03, 2021 9:26 pm
Forum: Development
Topic: Stages 67-69
Replies: 3
Views: 6913

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...
by frank
Wed Dec 01, 2021 12:05 am
Forum: Development
Topic: Stages 67-69
Replies: 3
Views: 6913

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...
by frank
Sun Nov 28, 2021 11:10 am
Forum: Development
Topic: Strings, strings and strings
Replies: 3
Views: 7082

Re: Strings, strings and strings

aurel wrote: Sat Nov 27, 2021 6:44 pm what kind of distro is that
Ubuntu ..Debian
just asking..
Manjaro XFCE. I use the OS extensively for development.
by frank
Fri Nov 26, 2021 11:13 pm
Forum: Development
Topic: Strings, strings and strings
Replies: 3
Views: 7082

Re: Strings, strings and strings

Another example program assigning mixed string types. ' SharpBASIC stre02 ' ----------------- incl "lib/sys.sbi"; const c = "Tell me,"; dim s1: str * 12; dim s2: str * 7; dim s3: str = "does it fit?"; main do s1 = c; print(s1); s1 = s3; print(s1); s2 = s3; print(s2); s3...