Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:36 17 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite MMBasic V5.3 Beta 10

     Page 2 of 2    
Author Message
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3677
Posted: 02:23pm 15 Jan 2017
Copy link to clipboard 
Print this post

  robert.rozee said   i believe the below code should fix the bug in VAL():

// Returns the numerical value of the ?string$?.
// n = VAL( string$ )
void fun_val(void) {
char *p, *q, *tl, *td;
...snip...
case 'H': iret = strtoll(++p, &tl, 16); break;
// note that we MUST supply a variable for the
// third arg of strol() due to a bug in C32 2.1
...
}



That's a curious comment (apart from the typo) - you always need to supply the 3rd arg but what is that about a variable? Not that you specify one!

JohnEdited by JohnS 2017-01-17
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2294
Posted: 03:39pm 15 Jan 2017
Copy link to clipboard 
Print this post

those are existing comments from geoff's source, not mine. no doubt the code has been reworked a number of times over the years, so the comments may not even be relevant any more.

cheers,
rob :-)
 
Cremo
Newbie

Joined: 21/07/2015
Location: Italy
Posts: 34
Posted: 06:30am 31 Jan 2017
Copy link to clipboard 
Print this post

Hello,
I would like to show some test of harmonic distortion of the instruction "TONE".
I did the tests using a SR770 FFT Spectrum Analyzer.

It is interesting that the distortion is almost proportional to frequency.



 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024