Just as a random side comment on this subject, I've seen other BASICs with either an SPRINT/SPRINT USING statement (SPRINT -> PRINT to a string) or a USING$ function, which is probably implemented by "riding" the code of PRINT USING. Perhaps it might be worth thinking about implementing _USING$(pattern$,value)?
As another side comment: would it be so difficult to interface (implement) two new reserved words with the C/C++ printf() and sprintf() stdio.h functions using their syntax and parameters that would avoid to "translate" the current PRINT USING while being more powerfull?
Just my two cents.
hey, every penny counts :-)
I used to work with C++/# in my old BBS days. Wish I would have stuck with it, because I went from Telegard->Invision-Infinity (all pascal) to Proboard(C++), very weird change. Not only that, with all the pascal making a hit, I thought that would be the language of choice, and BOOM here comes "C" LOL
OK I digress.....
sprint, print etc.. all output to the screen/console
I needed something that returned a var that does the same thing.
or at minimum a PHP version of "
number_format" which does not require a template. Actually, I should check that script source out and see how they did that (slow thinker LOL)
I do like your idea, however Im wanting to keep the langs separate (at least for now).
Nice Idea though
EDIT:
================================
Here is afunctional version in PHP... The original is in C, So will look at that. I personally think this might be a useful function to add in QB64 IMHO
$len=strlen($num);
$newnum='';
for ($i
=0; $i
<$len;
++$i
) { $newnum=','.$newnum;
}
$newnum=$num[$len-$i-1].$newnum;
}
}