ER Allow more expressions on the calculation line ?

Issue #266 new
Former user created an issue

Originally reported on Google Code with ID 266

Coming from CCalc, I can do this on the expression line

k=0;n=30;;k=(k%9)+1;(n+k)!

Then, I simply hit Enter  11 times and I get this :

ans = 8222838654177922817725562880000000
ans = 263130836933693530167218012160000000
ans = 8683317618811886495518194401280000000
ans = 295232799039604140847618609643520000000
ans = 10333147966386144929666651337523200000000
ans = 371993326789901217467999448150835200000000
ans = 13763753091226345046315979581580902400000000
ans = 523022617466601111760007224100074291200000000
ans = 20397882081197443358640281739902897356800000000
ans = 8222838654177922817725562880000000

What this is doing is, is a couple of simple, but very useful things
a) Semicolon separator allows multiple expressions on one line.
b) Double semi-colon splits and 2nd and 3rd etc Enter's repeat ONLY
the trailing expressions (those after the ;; )
You can also think of this as a Stack separator
- ie enter can evaluate multiple expressions, and you can also initialize
and enter a cycling equation, all in a simple single pasted line.

So I write this in my source code
k=0;n=30;;k=(k%9)+1;(n+k)!
and know anyone else can paste this into the calculator line and
repeat (or modify) the results.

CCalc also allows Selective Variable display
 k=0;n=20;;k=(k%9)+1;l=(n+k)!;disp k; disp l;
[Press CR twice for :]
k = 1
l = 51090942171709440000
k = 2
l = 1124000727777607680000
etc
and the expression stack contains 
 k=(k%9)+1;l=(n+k)!;disp k; disp l;
next on stack is 
 k=0;n=20;

Reported by Jim.Granville on 2009-03-05 06:36:50

Comments (2)

  1. Former user Account Deleted

    Reported by helder.pereira.correia on 2014-11-28 17:49:00 - Labels added: Type-Enhancement

  2. Log in to comment