QB64 Phoenix Edition
Any C programmers wanna help convert code to convert between MIDI + CSV? - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10)
+---- Thread: Any C programmers wanna help convert code to convert between MIDI + CSV? (/showthread.php?tid=803)

Pages: 1 2 3 4 5 6 7 8 9 10


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - Kernelpanic - 09-04-2022

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?


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - madscijr - 09-05-2022

(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?


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - SMcNeill - 09-05-2022

(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


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - SpriggsySpriggs - 09-06-2022

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.


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - SpriggsySpriggs - 09-06-2022

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.


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - madscijr - 09-08-2022

(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.


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - mnrvovrfc - 09-08-2022

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


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - madscijr - 09-08-2022

(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...


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - TempodiBasic - 09-12-2022

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_gemelli_(Twins).jpg#/media/File:I_gemelli_(Twins).jpg


RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - TempodiBasic - 09-12-2022

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.