Stages 67-69

Follow the development of the SharpBASIC compiler and share your thoughts and ideas.
Locked
User avatar
frank
Site Admin
Posts: 40
Joined: Sun Nov 21, 2021 12:04 pm
Location: Netherlands
Contact:

Stages 67-69

Post by frank »

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 stage I added the built-in string function left as a first step to handling string expressions, which will be the next stage.

Image
Keep it simple!
aurel
Posts: 11
Joined: Tue Nov 23, 2021 12:18 pm

Re: Stage 69

Post by aurel »

hi
How you think that user know which end is for specific block of code ?
sorry but is little bit unclear to me

in c it is curly { }
or

{
code
}
aurel
Posts: 11
Joined: Tue Nov 23, 2021 12:18 pm

Re: Stage 69

Post by aurel »

ahh ...i get it , so you use do / end
instead of { }
User avatar
frank
Site Admin
Posts: 40
Joined: Sun Nov 21, 2021 12:04 pm
Location: Netherlands
Contact:

Re: Stage 69

Post by frank »

aurel wrote: Fri Dec 03, 2021 1:33 pm 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 SharpBASIC syntax. C and other languages have curly brackets {..}, which I dislike for multiple reasons. Pascal actually preceded the curly brackets with begin..end. Much better, but just a bit too verbose for my taste.
Keep it simple!
Locked