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 - luke

Pages: [1] 2 3 ... 22
1
QB64 Discussion / Cheerio, it's been fun
« on: April 16, 2022, 07:48:13 am »
I'll still be at github.com/flukiluke, or you can email me at qb64[at]alephc.xyz

@odin apparently I don't have admin login any more, delete this account please - I shan't be needing it.

2
QB64 Discussion / Re: _FileExists not working with wildcards
« on: April 14, 2022, 08:58:04 pm »
It's fundamentally the wrong idea to rely on _fileexists to say whether or not an IO operation will succeed. The file might exist but you have insufficient permission to open/delete it, another program might remove the file between your program checking and using the file, there may be a network error (if the file is from a network share). A more robust solution is to simply catch the error and respond accordingly:
Code: [Select]
'At the top of the program
On Error Goto general_error
Dim Shared Error_happened As Long

'Main Program

End
general_error:
Print "Fatal error"; err; "at line"; _errorline
end

io_error:
Error_happened = err
Resume Next

Sub delete_files(names$)
Error_happened = 0
On Error Goto io_error
Kill names$
On Error Goto general_error
If Error_happened then
  'Ignore or inform user, depending on use case
End If
End Sub

3
QB64 Discussion / Re: What's your philosophy about constants?
« on: March 26, 2022, 07:12:36 am »
Please report any observed discrepancies in floating point calculations as they are intended to be the same across operating systems and x86 vs x86-64.

4
You will have a much easier time of things if you start by assuming the input does not match, and only setting the return value to true when it does.

5
QB64 Discussion / Re: New stable version?
« on: February 18, 2022, 08:24:02 am »
On Github, watch the repository then change the notification settings to custom -> releases.

6
QB64 Discussion / Re: QB64 interoperability with FreeBasic
« on: February 07, 2022, 12:32:17 am »
General note: a .a file is an archive file, which typically contains one or more .o object files. The linker is capable of pulling object files directly out of archives, otherwise you can examine them with the ar tool.

7
Programs / Re: The L-BASIC Interpreter
« on: February 05, 2022, 08:42:42 am »
Well that's a rather embarrassing mistake to have made! A small typo meant it thought Subs were Functions for the purposes of setting a return value. Here's a fixed version 0.1.2, which also includes a bunch of new commands (notably mouse support) and preliminary support for returning arrays from functions.

8
Here's the hacky method mentioned by luke:
https://qb64forum.alephc.xyz/index.php?topic=4602.msg140102#msg140102
Not quite, that requires the function name to be known as compile time. OP wants to call a function based on a string name known at runtime, which I would imagine looking up symbols in the executable in a fashion similar to loading a dynamically linked library.

9
No.

Edit: no, unless someone writes some extremely hacky C++.

10
QB64 Discussion / Re: error in forums when trying to Modify a post
« on: January 28, 2022, 09:24:45 pm »
No, it wouldn't have effected the size of new posts. Posts are only written to the history table when you make an edit. For a fresh post, it only exists in the live table which was already set to the larger limit.

You'll note that forum itself counts your characters. The database should be able to handle any post within that limit.

11
QB64 Discussion / Re: Double Check on order of operations
« on: January 26, 2022, 10:06:31 pm »
The full list, from highest to lowest precedence, is:
  • Exponentiation (^)
  • Negation (-)
  • Division (/), Multiplication (*)
  • Integer Division (\)
  • MOD
  • Subtraction(-), Addition(+)
  • Equality (=), Ordering (<, <=, >, >=)
  • NOT
  • AND
  • OR
  • XOR
  • EQV
  • IMP
Operators on the same line are evaluated left to right, or inside out in the case of the unary operators NOT and negation. In practice, this means:
  • NOT 2 + 3 is NOT (2 + 3) because + has higher precedence and so is evaluated first
  • - 2 ^ 3 = -(2 ^ 3) because ^ has higher precedence and so is evaluated first

Apparently this full list isn't in the wiki anywhere; it probably should be.

12
QB64 Discussion / Re: What happend to the Forum & Wiki?
« on: January 26, 2022, 08:17:47 pm »
Luckily there was a separate setting to control just the inline attachments, so now it should be back to "how it was".

13
In a word, no. VBA can easily do this by virtue of being an interpreted language; QB64 is always compiled which makes such things much harder (I'm sure someone will come up with a hack using DECLARE LIBRARY to prove me wrong).

14
QB64 Discussion / Re: What happend to the Forum & Wiki?
« on: January 26, 2022, 07:42:16 am »
Le Sigh

Fixed now. The great thing about standards for escaping HTML is that there's so many to choose from...

15
QB64 Discussion / Re: Forum looks bad from Android (and FireFox)
« on: January 26, 2022, 07:13:15 am »
This should be dealt with now. Let me know if you find any other pages that are broken.

Pages: [1] 2 3 ... 22