SRL Archive - Development

WriteLn does not conform to spec


Aftermath

2011-11-28 02:47:46

WriteLn should support varargs and types other than strings. This would be a significant quality-of-life increase.

program TestWriteLn;
var x: Integer;
begin
x := 0;
writeln('x', x);
end.

Edit: Move this thread to http://villavu.com/forum/forumdisplay.php?f=305

YoHoJo

2011-11-28 02:53:27

program TestWriteLn;
var x: Integer;
begin
x := 0;
writeln(IntToStr(x));
end.

That what you want?

http://docs.villavu.com/simba/scriptref/string.html?highlight=tostr

Harry

2011-11-28 02:56:35

No thanks. Make a WriteLnEx would be useful for those features. ToStr should handle most stuff.

Aftermath

2011-11-28 05:38:07

The way I posted is the way that Pascal's WriteLn is supposed to function…

Markus

2011-11-28 06:06:14

Too bad the current crap interpreter doesn't support this. Maybe lape could do this?

Harry

2011-11-28 06:14:59

From: Aftermath
The way I posted is the way that Pascal's WriteLn is supposed to function…

Yes, but there is no reason to change it without it breaking the old functionality, no?

Aftermath

2011-11-28 06:21:42

From: Harry
Yes, but there is no reason to change it without it breaking the old functionality, no?


There is a reason to change it - it makes debugging more painful than it needs to be. Also, the new functionality is a superset of the old, so there would be no impact on current scripts. Also, it would make code much more readable in certain instances.

Wizzup?

2011-11-28 06:26:36

PascalScript doesn't support this, as far as I know.

Gu3st...

2011-11-28 06:30:39

WriteLn(['x', x]);
?

E:
for x := 0 to 100 do
WriteLn(['x', x]);

Nava2

2011-12-03 11:43:43

You can use Format. :)

nielsie95

2011-12-03 11:50:44

It's not a bug, it's just not supported. Pascal Script does not support it, but it would sure be very useful. Lape does support it.

mastaraymond

2011-12-05 05:21:03

From: Aftermath
WriteLn should support varargs and types other than strings. This would be a significant quality-of-life increase.

program TestWriteLn;
var x: Integer;
begin
x := 0;
writeln('x', x);
end.

Edit: Move this thread to http://villavu.com/forum/forumdisplay.php?f=305

I just put it, in array's when I'm debugging, kindatricky yes. Pascalscript does not support variable parameters :(.