Any C programmers wanna help convert code to convert between MIDI + CSV?
#71
Quote:I'm not sure if this makes a difference in QB64, but in VBA, the IDE doesn't complain about the syntax that way...
Yes, that's possible, but only the brackets reduced the error message.
The compiler doesn't recognize everything either. It's just also only a program. No perfect.

The question here is: Is it the program or the QB64?
Reply
#72
(09-04-2022, 09:51 PM)Kernelpanic Wrote:
Quote:I'm not sure if this makes a difference in QB64, but in VBA, the IDE doesn't complain about the syntax that way...
Yes, that's possible, but only the brackets reduced the error message.
The compiler doesn't recognize everything either. It's just also only a program. No perfect.

The question here is: Is it the program or the QB64?

Have you tried it with the previous 2.x build of QB64 or an earlier one like 1.5?
Reply
#73
(09-04-2022, 06:45 PM)madscijr Wrote:
(09-04-2022, 06:10 PM)Kernelpanic Wrote: If you put brackets around it,  are there fewer mistakes.  Confused

[Image: Get-Int-Vector.jpg]

One thing I learned in VBA is, if you're calling a routine that doesn't return a result (a sub), like 

mySub(param1, param2, param3)

then leave off the parentheses:

mySub param1, param2, param3

if you want the parentheses, then put Call before the routine name:

call mySub(param1, param2, param3)

I'm not sure if this makes a difference in QB64, but in VBA, the IDE doesn't complain about the syntax that way...


This is the same BASIC behavior which goes back to the days of QBASIC.  It's the expected standard reaction with SUBs.  Wink
Reply
#74
Just thought I'd throw my two cents in.... You can definitely run machine code in QB64. Luke helped me with this last year and we did it in both Linux and Windows. It won't be as intuitive as CALL ABSOLUTE, perhaps, but I reckon it should work just as well. If I can manage to find my code for running machine code, I'll send it your way.
Ask me about Windows API and maybe some Linux stuff
Reply
#75
You all might not need or use this but attached is a 7-Zip file with code I have used in both Linux and Windows for running machine code from a buffer. It was designed for a very specific test scenario so someone would need to tailor it for their own needs. Anyways, I hope it is of at least some assistance; even if it doesn't get used for this project.


Attached Files
.7z   MachineCodeQB64.7z (Size: 143.36 KB / Downloads: 87)
Ask me about Windows API and maybe some Linux stuff
Reply
#76
(08-26-2022, 04:24 AM)JRace Wrote: That compilable source includes a batch file to automate compilation using QB64's bundled MinGW.

On the subject of MiniGW, I read that GCC can not only compile C and C++, but also Objective-C, Fortran, Ada, Go and D. 
So can that batch file be tweaked to get it to build code from those languages, or is the MiniGW included with QB64 limited? 

PS I also read "Versions prior to GCC 7 also supported Java, allowing compilation of Java to native machine code." Wow, I'm not a Java person, but it's neat to know that is (was?) possible.
Reply
#77
The Windows download for QB64 was supposed to be much larger than actually, so "gcc" supports languages other than C and C++ through MinGW. As of QB64 v0.98 the package was fast approaching 100MB even with a 7Z file so... important decisions for cutting back had to be made. Not entirely successful as I saw some language-related files and names of hardware devices flashing into the dialog of 7-Zip as it decompresses into my HDD...
Reply
#78
(09-08-2022, 03:23 AM)mnrvovrfc Wrote: The Windows download for QB64 was supposed to be much larger than actually, so "gcc" supports languages other than C and C++ through MinGW. As of QB64 v0.98 the package was fast approaching 100MB even with a 7Z file so... important decisions for cutting back had to be made. Not entirely successful as I saw some language-related files and names of hardware devices flashing into the dialog of 7-Zip as it decompresses into my HDD...

That makes sense. All we need is C, so...
Reply
#79
and C++
Lol for many people C and C++ and C# are relatives... but do you remember the twins Arnold Schwarzenegger and Denny De Vito?
Just the same!
https://it.wikipedia.org/wiki/File:I_gem...Twins).jpg
Reply
#80
PostScriptum:
you can find Gfortran.exe in the folder QB64\internal\c\c_compiler\bin
I think you can use it in association with Notepad++ with setting for fortran syntax.
Reply




Users browsing this thread: 48 Guest(s)