Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Cobalt

Pages: [1] 2 3 ... 59
1
QB64 Discussion / Re: _FileExists not working with wildcards
« on: April 14, 2022, 02:39:16 pm »
_FILEEXISTS isn't supposed to accept wildcards. Its purpose is to check if a specific file exists. if you need to check if a series of files exists then you will either need to make a loop that iterates through the total possible instances of a specific file, say if TRASH0000.TXT to TRASH9999.TXT was the naming convention. Otherwise you will need to probably look into a SHELL style command or some form of API call.

2
Programs / Re: Just a silly "Hello World" Marquis
« on: April 11, 2022, 11:52:53 am »
It's not an Easter Egg if they're ALL like that, Steve, squirreled away in the obscurity of uselessness

Should I be embarrassed that in my copy that command works?


 
HelloWorldCommand.jpg

3
QB64 Discussion / Re: QB64 Bounty List
« on: April 09, 2022, 04:41:41 pm »
Last week, he in Melbourne Australia, our fuel cost was $2.20 per Litre - 4.8 litres per gallon - that's roughly AU$10.56 per gallon (Almost US$7.90)

FYI 3.8l per gal.
but still a hell-of-a-lot of money.

4
Please fix this problem.

Its open source on Github, have at it.

Though if I were planning on landing a rover on Pluto I would probably go with an assembly language that matches the processors used in its onboard computer(s). Then you would have much more control over how you want floating point numbers handled.  But if you just want to play around with simulating such events and learning how to overcome, sidestep or work around certain limitations then Welcome To BASIC.

5
but it's use would be cumbersome

Hence why QB64 would not have one. BASIC is not meant to be cumbersome. Which of course may leave some wanting, but if they need

something like that they probably need to step away from BASIC languages.

But then it comes down to how much actual precision do you really need?

6
QB64 Discussion / Re: Question regarding interacting with Excel files
« on: April 02, 2022, 10:26:40 am »
Not to sure about more modern formats, So I don't know how helpful this will be.
But I once played with the old Excel format from Excel97. Was able to read and write to cells, but I never tried any kind of formatting.
Not sure if it still exists or has modern formats but I used a site called Wotsit's format. not sure if it is even still around.

You'll want to search around and try to find information about the formatting of the xlsx files. Once you know just how the data is stored its not too hard to GET and PUT to play around with it.

7
Its all relative, if thats not an over used phrase.

How much precision do you really need?

If your trying to pinpoint a single snow flake on the surface of Pluto then you probably need some pretty sharp precision.

If your trying to put a golf ball in a 55 gallon drum sitting next to you.. probably not.

They're not going to waste a lot of time on something like this unless your going into a field that requires accuracy on the sub-atomic scale.

(why am I double spacing all my posts?)

8
QB64 Discussion / Re: TIMER vs SLEEP
« on: April 01, 2022, 12:13:20 am »
There is also this nice little feature:

TIMER(BLAH) OFF

that you can call before SLEEPing

then

TIMER(BLAH) ON

when you wake up

9
There is no single right answer.

You'll have to find the way that best works with what your trying to accomplish.

divide as you have shown there, or

z! = INT(I!*1000)\1000  say if you wanted 3 points of precision.

Use that string math thingy thats floating around here somewhere.

Or just work something out that gives you the results that you can work with.

Just the nature of the floating point beast.

10
QB64 Discussion / Re: Has $Debug been working well for you?
« on: March 11, 2022, 10:03:02 am »
@Cobalt you do know you've asked me this before and that I did add it to the Debug menu, right?

Took me a hot second to remember.

Must have missed the memo...

11
QB64 Discussion / Re: Has $Debug been working well for you?
« on: March 09, 2022, 07:10:57 pm »
Hate to be a naysayer BUT, It seems to be way too invasive, there are a multitude of buttons associated with it that constantly cause popups if accidentally pressed. Plus clicking too far to the left side trying to get to the beginning of a line.

Perhaps an option to completely disable it if you don't need it? That way it doesn't get in the way but, can still be turned back on when needed?

12
QB64 Discussion / Re: &H colors dont work as CONST
« on: March 05, 2022, 05:58:22 am »
I hate to disagree with fellow Ohioan but Const is valuable part of coding in my book. You don't have to use them in your book but to me it is important they work as well as any other coding tool.

Not sure how to take that.

I didn't mean to suggest that const be mothballed or such. Just that it did not need further disruption, inpart to one of Fellippe's comments earlier.

The whole CONST system was replaced by Steve at some point. We're in internal talks to replace the pre-compiler const evaluator with a runtime evaluator - technically that'd make CONSTs regular variables that have a "can't change" flag. That's in the works, but we don't have a public road map for this specific update yet, so please keep Rho's indications in mind for now.

I would consider myself quite the hypocrite if I said "const's are not important so shove em'" Not sure what I would do without them!
If perhaps you don't like using the affix ~&, it seems to work fine using _RGB32(R,G,B) to assign a color value to a  constant.

13
QB64 Discussion / Re: &H colors dont work as CONST
« on: March 03, 2022, 07:44:46 pm »
I don't really care one way or the other, works fine for me now. I just thought I see if Bplus was right about it being different in an earlier version or not. And he was.
AND it turns out Steve is right too! Ver .954(SDL) displays a -1.
Guessing, perhaps, when it switched over to GL it assigned the CONST differently and then an update sometime after 1.1\1.2 changed the way they are allocated.

I say leave them alone. CONSTs are fine just how they are.

14
QB64 Discussion / Re: &H colors dont work as CONST
« on: March 03, 2022, 04:55:29 pm »
Well Bplus is right, Back in Ver 1.1Build82 you can just do this:
CONST WHITE = &HFFFFFFFF
and you get the correct value, sometime between 1.1 and 1.4 that was changed
Can not find my copies of 1.2 and 1.3 to see what happens there.

As you can see in the attachment, Ver 2.1 prints -1 while Ver 1.1B82 prints the correct value for an _UNSIGNED constant

  [ You are not allowed to view this attachment ]  

15
QB64 Discussion / Re: Problem with OPEN in SUB
« on: February 26, 2022, 12:22:01 pm »
Would have been nice if somebody would have pointed out what you did wrong, though you might of garnered it from the example replies.

This was your original issue;

SUB text (g, ttt, testing, t1, t2, t3)

If you wanted to pass a UDT you needed to use the AS statement just like in a DIM line

SUB text (g, ttt AS testing)
called with
text 1, ttt

in your original line, each of those variables being passed were passed as the SINGLE data type, by default since you did not specify.

That is why you were not seeing the results you expected.

Now you didn't receive any kind of error because you didn't write one bit of code wrong! Every thing you typed was valid code. Just not the code that would produce the results you wanted.  ttt.t1 is a valid variable even without UDT.

and GET #1, g, ttt
worked correctly too it loaded 4bytes (length of a SINGLE) into ttt, but instead of as a STRING it loaded it as a SINGLE(numeric) value. so no error

and of course PRINT ttt.t1 would have printed 0 as ttt.t1 was a SINGLE value that had nothing assigned to it.(same with the other 2 print lines) so still no error

max = LOF(1) / LEN(ttt)
here LEN(ttt) would have been 4, again because ttt is a SINGLE value which is 4 bytes long. again no error on the compiler side.

Hopefully that explains what occurred, and you can avoid (or make) some problems in the future with this knowledge.

Pages: [1] 2 3 ... 59