ICE icon indicating copy to clipboard operation
ICE copied to clipboard

New functions

Open PeterTillema opened this issue 7 years ago • 17 comments

LEFT( for bitshift left RIGHT( for rightshift ElseIf (instead of Else:If) Stop

PeterTillema avatar Jun 28 '18 20:06 PeterTillema

You didn't add the RIGHT( function?

Ti64CLi avatar Jul 24 '18 17:07 Ti64CLi

https://github.com/PeterTillema/ICE/blob/9a0a180f8d50643e6270e10dcf02789b7db5ac97/src/functions.c#L660-L707

PeterTillema avatar Jul 25 '18 10:07 PeterTillema

Then, why did you overlined the RIGHT( for rightshift ?

Ti64CLi avatar Jul 25 '18 12:07 Ti64CLi

Because it's implemented now, don't need to add it anymore :P

PeterTillema avatar Jul 25 '18 12:07 PeterTillema

Oh, ok, sorry for that. So, I guess LEFT is also implemented?

Ti64CLi avatar Jul 25 '18 12:07 Ti64CLi

It's so weird. I saw that LEFT wasn't implemented yet // LEFT( if (function2 == tLEFT) { } But he works on my calc ^^'

Ti64CLi avatar Jul 25 '18 12:07 Ti64CLi

Sure it works, but it doesn't produce any code yet.

PeterTillema avatar Jul 25 '18 22:07 PeterTillema

Though, when I compile that code : Disp LEFT(4,1) It displays 8

Ti64CLi avatar Jul 26 '18 11:07 Ti64CLi

Yes, because both arguments are numbers, and then it gets optimized: https://github.com/PeterTillema/ICE/blob/a54747033004cfff9ae81a776fe332420d419908/src/parse.c#L666-L667

PeterTillema avatar Jul 26 '18 11:07 PeterTillema

Ok, thank you

Ti64CLi avatar Jul 26 '18 11:07 Ti64CLi

Wait, Stop, DelVar, Menu( can be implemented ? And if yes, will they be ?

Xenoxis avatar Jan 13 '19 13:01 Xenoxis

Will also be good if you can add switch statement with case

Xenoxis avatar Jan 13 '19 17:01 Xenoxis

Wait is essentially the same as Pause, Stop is a good one, DelVar is the same as 0->,Menu( is way too hard to implement, and switch / case looks too much like C.

PeterTillema avatar Jan 14 '19 10:01 PeterTillema

Is it bad if it looks like C ? Because switch can be interesting for some variables processing as interger and would be more efficient than lots of if, isen't it ?

Xenoxis avatar Jan 14 '19 11:01 Xenoxis

I agree with Xenoxis, Menu( could be very useful ;)

Ti64CLi avatar Jan 18 '19 16:01 Ti64CLi

I would argue against it, as it would be used on the main screen, not in the canvas mode. I, personally, do not see many ICE programs not use the drawing canvas, as ICE's main attraction is the use of the canvas to expand upon BASIC programs.

npease18 avatar Jan 18 '19 17:01 npease18

Sure, Menu( is very useful, but it would be very large code, and you can 'easily' write it yourself.

PeterTillema avatar Jan 18 '19 18:01 PeterTillema