Outputting into console without a newline?
Outputting into console without a newline?
Is it possible to output a character into console without outputting a newline. My interpreter would need such a functionality.
Re: Outputting into console without a newline?
Initial version is running and outputting into screen for now.
Re: Outputting into console without a newline?
you probably know this already, but would a workaround of joinig strings together work out?
example:
example:
Code: Select all
x=1
y=2
string="X:"..x.."Y:"..y
debugprint(string)Re: Outputting into console without a newline?
That won't work as the interpreters simple virtual machine is executing a byte code, where printing of a string literal is encoded as a sequence of 'wrc character' op-codes to print character at a time followed by a 'wrl' op-code to print the line feed at the end.Bugala wrote:you probably know this already, but would a workaround of joining strings together work out?
I will add a string and real data types in the near future. Also Pascal style grammar will probably change into something more REXX like. Arrays will be implemented using stem array style notation:
Code: Select all
array1.10: integer;
array2.20.20: integer;
Re: Outputting into console without a newline?
Here is a little compiled demo for testing purposes on AmigaOS4, MorphOS and Windows.
It takes "-i filename" as parameter and test.pas and primes.pas files are included for testing purposes.
It takes "-i filename" as parameter and test.pas and primes.pas files are included for testing purposes.
- airsoftsoftwair
- Posts: 5887
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Outputting into console without a newline?
Unfortunately, it isn't. If you had asked this two weeks earlier, I could have implemented it for 6.0 because it's obviously pretty trivial but now I'm afraid you'll have to wait until the next update...jalih wrote:Is it possible to output a character into console without outputting a newline. My interpreter would need such a functionality.