SRL Archive - Lape

Power not compatible with types


Gu3st...

2014-02-17 20:42:35

begin
writeLn( 2 ** 2 );
end.

Is there any reason this doesn't work?

Frement

2014-02-17 20:45:20

begin
writeLn( pow(2, 2) );
end.

Gu3st...

2014-02-18 00:12:22

From: Frement
begin
writeLn( pow(2, 2) );
end.
lape sub-forum :)

Frement

2014-02-18 01:06:06

From: Brandon
That is it.. no power operator. Also, in the most recent Simba, ** as power operator is broken.

Example:

begin
writeln((2 ** 2)); //Exception in Script: Operator "Power" not compatible with types at line 2, column 14
end.


Needs 3 characters.

slacky

2014-10-23 12:33:38

From: Zyt3x
begin
writeLn( 2 ** 2 );
end.

Is there any reason this doesn't work?

The power-operator at time of your post was not implemented, it was only supported by lapes parser, but was lacking processing-functions.
- It's added in the Lape-version Simba 1.1 uses