Search found 65 matches

by spotlessmind1975
Sun Nov 05, 2023 11:10 pm
Forum: New features
Topic: How READ...DATA work
Replies: 9
Views: 12993

Re: How READ...DATA work

wysardry wrote: Fri Nov 03, 2023 10:20 am For example, if you had a bit array with 128 elements, would you assign the values in blocks of 8 bits or use a single large (128 bit) number?
No, I would use 16 numbers (16x8 bit = 128 bit).
by spotlessmind1975
Sun Nov 05, 2023 11:08 pm
Forum: New features
Topic: Short circuit evaluation: yes or no?
Replies: 6
Views: 10509

Re: Short circuit evaluation: yes or no?

Hmm. I'm not sure I like the idea of using a function within an IF statement in the first place, because I've always used them to check the current state of something before possibly changing it rather than trying to do both at once. In reality it is not that strange: in fact, it is the basis of fu...
by spotlessmind1975
Sun Nov 05, 2023 9:43 pm
Forum: New features
Topic: The new DRAWing command
Replies: 3
Views: 7697

The new DRAWing command

[italian and french follow] :arrow: ENGLISH Hi everyone ! With the new version (and from the beta version) a new command has been introduced: DRAW .When you draw a figure onto a piece of paper, your pen starts at a particular place and it moves up or right for a certain amount, then down, and so on...
by spotlessmind1975
Sun Nov 05, 2023 8:38 pm
Forum: New features
Topic: New PRINT @ grid command
Replies: 0
Views: 9254

New PRINT @ grid command

[italian and french follow] :arrow: ENGLISH Hi everyone ! Starting from the next version (and already available in beta) there is a new command: PRINT@grid . This is a command that allows you to place output at a specified place on the screen. It similar to LOCATE , with the main difference that us...
by spotlessmind1975
Fri Nov 03, 2023 7:28 am
Forum: New features
Topic: Compatibility with other BASIC dialects?
Replies: 6
Views: 12398

Re: Compatibility with other BASIC dialects?

Exactly, it is precisely because there is this condition of confusion that, at the end of the story, each developer decides what to put or not into the language, syntax and semantics. If we consider ourselves with the mentality of the time, I still believe that it was a good solution to adapt to har...
by spotlessmind1975
Fri Nov 03, 2023 7:23 am
Forum: New features
Topic: How READ...DATA work
Replies: 9
Views: 12993

Re: How READ...DATA work

Is it possible to store bits in DATA statements? Not in "safe" mode because it would not be possible to "package" them. In addition to the difficulty of specifying that the constant is a bit, in memory then 1 bit will take up, at least, two bytes (1 for the type, 1 for the bit)....
by spotlessmind1975
Fri Nov 03, 2023 7:17 am
Forum: New features
Topic: Short circuit evaluation: yes or no?
Replies: 6
Views: 10509

Re: Short circuit evaluation: yes or no?

Hi wysardry ! I'm not 100% sure what you mean by "side effects". Ok, so, let's imagine we're writing a role-playing game. In this game there is a function, which is called isHungry . This function checks whether the player is hungry ( :lol: ) and, if he/she is hungry and there is enough fo...
by spotlessmind1975
Thu Nov 02, 2023 1:05 pm
Forum: New features
Topic: How READ...DATA work
Replies: 9
Views: 12993

Re: How READ...DATA work

I'm guessing that as they're optional, you can use line numbers just on the lines with DATA statements and omit them everywhere else? As in other uses, in ugBASIC line numbers are always optional. Would it be possible to start numbering the DATA lines from 1 instead of 101 to avoid the need to add ...
by spotlessmind1975
Thu Nov 02, 2023 7:57 am
Forum: New features
Topic: How READ...DATA work
Replies: 9
Views: 12993

Re: How READ...DATA work

Hello wysardry ! What I would like to do, is have a string variable such as roomText$ and be able to READ the right string DATA for it based on the value of an integer variable such as roomNum. Depending on the power and flexibility of the BASIC language you are considering, these are instructions t...
by spotlessmind1975
Wed Nov 01, 2023 8:34 am
Forum: New features
Topic: Short circuit evaluation: yes or no?
Replies: 6
Views: 10509

Short circuit evaluation: yes or no?

Hi to everyone! Someone asked if ugBASIC supports short circuit evaluation . On Wikipedia there is a complete explanation. In a short, the following argument in a boolean expression is executed or evaluated only if the first argument does not suffice to determine the value of the expression. I.e. i...