Post Reply 
Top three calculators ?
04-06-2018, 06:52 PM
Post: #68
RE: Top three calculators ?
(04-06-2018 06:25 PM)rprosperi Wrote:  
(04-06-2018 12:14 PM)Maximilian Hohmann Wrote:  In my experience it is almost impossible to write unreadable code in a language like FORTRAN.

This tool will help with that...

You can find the most amazing examples of unreadable code. This is a basic interpreter written in C:

Code:

#define O(b,f,u,s,c,a)b(){int o=f();switch(*p++){X u:_ o s b();X c:_ o a b();default:p--;_ o;}}
#define t(e,d,_,C)X e:f=fopen(B+d,_);C;fclose(f)
#define U(y,z)while(p=Q(s,y))*p++=z,*p=' '
#define N for(i=0;i<11*R;i++)m[i]&&
#define I "%d %s\n",i,m[i]
#define X ;break;case
#define _ return
#define R 999
typedef char*A;int*C,E[R],L[R],M[R],P[R],l,i,j;char B[R],F[2];A m[12*R],malloc
(),p,q,x,y,z,s,d,f,fopen();A Q(s,o)A s,o;{for(x=s;*x;x++){for(y=x,z=o;*z&&*y==
*z;y++)z++;if(z>o&&!*z)_ x;}_    0;}main(){m[11*R]="E";while(puts("Ok"),gets(B)
)switch(*B){X'R':C=E;l=1;for(i=0;i<R;P[i++]=0);while(l){while(!(s=m[l]))l++;if
(!Q(s,"\"")){U("<>",'#');U("<=",'$');U(">=",'!');}d=B;while(*F=*s){*s=='"'&&j
++;if(j&1||!Q(" \t",F))*d++=*s;s++;}*d--=j=0;if(B[1]!='=')switch(*B){X'E':l=-1
X'R':B[2]!='M'&&(l=*--C)X'I':B[1]=='N'?gets(p=B),P[*d]=S():(*(q=Q(B,"TH"))=0,p
=B+2,S()&&(p=q+4,l=S()-1))X'P':B[5]=='"'?*d=0,puts(B+6):(p=B+5,printf("%d\n",S
()))X'G':p=B+4,B[2]=='S'&&(*C++=l,p++),l=S()-1 X'F':*(q=Q(B,"TO"))=0;p=B+5;P[i
=B[3]]=S();p=q+2;M[i]=S();L[i]=l X'N':++P[*d]<=M[*d]&&(l=L[*d]);}else p=B+2,P[
*B]=S();l++;}X'L':N printf(I)X'N':N free(m[i]),m[i]=0    X'B':_ 0 t('S',5,"w",N
fprintf(f,I))t('O',4,"r",while(fgets(B,R,f))(*Q(B,"\n")=0,G()))X 0:default:G()
;}_ 0;}G(){l=atoi(B);m[l]&&free(m[l]);(p=Q(B," "))?strcpy(m[l]=malloc(strlen(p
)),p+1):(m[l]=0,0);}O(S,J,'=',==,'#',!=)O(J,K,'<',<,'>',>)O(K,V,'$',<=,'!',>=)
O(V,W,'+',+,'-',-)O(W,Y,'*',*,'/',/)Y(){int o;_*p=='-'?p++,-Y():*p>='0'&&*p<=
'9'?strtol(p,&p,0):*p=='('?p++,o=S(),p++,o:P[*p++];}
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Top three calculators ? - Sylvain Cote - 04-02-2018, 04:37 PM
RE: Top three calculators ? - CY-CL - 04-02-2018, 04:42 PM
RE: Top three calculators ? - emece67 - 04-02-2018, 04:48 PM
RE: Top three calculators ? - rprosperi - 04-02-2018, 06:09 PM
RE: Top three calculators ? - polbit - 04-02-2018, 06:22 PM
RE: Top three calculators ? - hth - 04-02-2018, 07:43 PM
RE: Top three calculators ? - Jlouis - 04-02-2018, 08:53 PM
RE: Top three calculators ? - John Keith - 04-02-2018, 09:01 PM
RE: Top three calculators ? - pier4r - 04-02-2018, 09:43 PM
RE: Top three calculators ? - DavidM - 04-02-2018, 09:54 PM
RE: Top three calculators ? - ttw - 04-02-2018, 11:05 PM
My top three calculators - striegel - 04-02-2018, 11:42 PM
RE: Top three calculators ? - Carsen - 04-03-2018, 05:02 AM
RE: Top three calculators ? - peacecalc - 04-03-2018, 06:58 AM
RE: Top three calculators ? - larthurl - 04-03-2018, 08:12 PM
RE: Top three calculators ? - pier4r - 04-03-2018, 10:19 AM
RE: Top three calculators ? - ChanTran - 05-05-2021, 06:44 PM
RE: Top three calculators ? - Gamo - 04-03-2018, 11:59 AM
RE: Top three calculators ? - pier4r - 04-03-2018, 12:47 PM
RE: Top three calculators ? - JimP - 04-03-2018, 12:32 PM
RE: Top three calculators ? - klesl - 04-03-2018, 01:45 PM
RE: Top three calculators ? - wtp - 04-03-2018, 05:57 PM
RE: Top three calculators ? - xmehq - 04-03-2018, 08:42 PM
RE: Top three calculators ? - peacecalc - 04-03-2018, 08:50 PM
RE: Top three calculators ? - toml_12953 - 04-03-2018, 08:55 PM
RE: Top three calculators ? - Harald - 04-03-2018, 09:13 PM
RE: Top three calculators ? - hp41cx - 04-03-2018, 11:48 PM
RE: Top three calculators ? - Waon Shinyoe - 04-04-2018, 09:11 PM
RE: Top three calculators ? - Voldemar - 04-04-2018, 11:25 PM
RE: Top three calculators ? - cjmcc - 04-05-2018, 03:10 AM
RE: Top three calculators ? - Graan - 04-05-2018, 07:14 AM
RE: Top three calculators ? - hp41cx - 04-05-2018, 12:02 PM
RE: Top three calculators ? - Harald - 04-05-2018, 06:30 PM
RE: Top three calculators ? - Logan - 04-05-2018, 06:44 PM
RE: Top three calculators ? - rprosperi - 04-05-2018, 07:34 PM
RE: Top three calculators ? - Harald - 04-05-2018, 08:41 PM
RE: Top three calculators ? - Harald - 04-05-2018, 08:33 PM
RE: Top three calculators ? - pier4r - 04-06-2018, 10:51 AM
RE: Top three calculators ? - lrdheat - 04-06-2018, 02:18 AM
RE: Top three calculators ? - pier4r - 04-06-2018, 12:04 PM
RE: Top three calculators ? - pier4r - 04-06-2018, 12:31 PM
RE: Top three calculators ? - Harald - 04-06-2018, 04:20 PM
RE: Top three calculators ? - rprosperi - 04-06-2018, 06:25 PM
RE: Top three calculators ? - Harald - 04-06-2018 06:52 PM
RE: Top three calculators ? - toml_12953 - 04-06-2018, 08:11 PM
RE: Top three calculators ? - DA74254 - 04-06-2018, 08:30 PM
RE: Top three calculators ? - rprosperi - 04-06-2018, 09:51 PM
RE: Top three calculators ? - Harald - 04-06-2018, 10:15 PM
RE: Top three calculators ? - ttw - 04-06-2018, 02:12 PM
RE: Top three calculators ? - brickviking - 04-07-2018, 04:48 AM
RE: Top three calculators ? - Archilog - 04-08-2018, 12:55 AM
RE: Top three calculators ? - damaltor - 04-09-2018, 06:48 AM
RE: Top three calculators ? - aurelio - 04-09-2018, 07:23 PM
RE: Top three calculators ? - Thomas Okken - 04-09-2018, 07:51 PM
RE: Top three calculators ? - aurelio - 04-10-2018, 06:35 PM
RE: Top three calculators ? - Luigi Vampa - 04-09-2018, 09:39 PM
RE: Top three calculators ? - Helix - 04-09-2018, 09:57 PM
RE: Top three calculators ? - Craig Bladow - 04-11-2018, 06:33 PM
RE: Top three calculators ? - John Cadick - 04-12-2018, 07:05 AM
RE: Top three calculators ? - Thomas Klemm - 08-18-2018, 04:41 PM
RE: Top three calculators ? - aurelio - 08-25-2018, 08:57 AM
RE: Top three calculators ? - DaveBr - 08-30-2018, 03:04 PM
RE: Top three calculators ? - Geoff - 08-30-2018, 10:14 PM
RE: Top three calculators ? - megarat - 09-02-2018, 04:24 AM
RE: Top three calculators ? - Paul Dale - 09-02-2018, 05:04 AM
RE: Top three calculators ? - toml_12953 - 09-02-2018, 04:02 PM
RE: Top three calculators ? - Jlouis - 09-02-2018, 05:08 PM
RE: Top three calculators ? - Archilog - 09-02-2018, 08:04 PM
RE: Top three calculators ? - Pjwum - 09-02-2018, 08:13 PM
RE: Top three calculators ? - Siegfried - 09-07-2018, 09:57 PM
RE: Top three calculators ? - Namir - 09-08-2018, 12:19 AM
RE: Top three calculators ? - Marcel Samek - 09-08-2018, 12:55 AM
RE: Top three calculators ? - Marcel Samek - 09-08-2018, 12:48 AM
RE: Top three calculators ? - DGM - 09-08-2018, 02:53 AM
RE: Top three calculators ? - edryer - 09-08-2018, 11:28 PM
RE: Top three calculators ? - tuxfish - 11-18-2018, 11:49 PM
RE: Top three calculators ? - badaze - 11-19-2018, 06:26 PM
RE: Top three calculators ? - StephenG1CMZ - 03-03-2019, 07:31 PM
RE: Top three calculators ? - KeithB - 11-21-2018, 02:22 PM
RE: Top three calculators ? - Craig Bladow - 11-21-2018, 07:35 PM
RE: Top three calculators ? - badaze - 11-19-2018, 06:28 PM
RE: Top three calculators ? - edryer - 11-20-2018, 08:15 AM
RE: Top three calculators ? - Claudio L. - 11-20-2018, 10:45 PM
RE: Top three calculators ? - xmehq - 11-23-2018, 11:49 PM
RE: Top three calculators ? - KeithB - 11-30-2018, 04:37 PM
RE: Top three calculators ? - Craig Bladow - 02-27-2019, 07:32 PM
RE: Top three calculators ? - GVHOVE - 02-27-2019, 08:33 PM
RE: Top three calculators ? - Thomas Okken - 03-03-2019, 02:17 PM
RE: Top three calculators ? - GVHOVE - 03-04-2019, 06:02 PM
RE: Top three calculators ? - JSS - 03-03-2019, 09:42 AM
RE: Top three calculators ? - cdmackay - 03-03-2019, 04:14 PM
RE: Top three calculators ? - JSS - 03-03-2019, 05:36 PM
RE: Top three calculators ? - Erwin - 03-03-2019, 11:41 AM
RE: Top three calculators ? - StephenG1CMZ - 03-04-2019, 09:04 AM
RE: Top three calculators ? - Bill Duncan - 03-04-2019, 11:02 PM
RE: Top three calculators ? - Craig Bladow - 03-09-2019, 04:22 AM
RE: Top three calculators ? - freelanzr - 04-10-2019, 02:10 AM
RE: Top three calculators ? - freelanzr - 06-19-2019, 08:54 AM
RE: Top three calculators ? - Marco Polo - 06-19-2019, 12:21 PM
RE: Top three calculators ? - BartDB - 07-04-2019, 12:43 PM
RE: Top three calculators ? - John Keith - 07-04-2019, 07:49 PM
RE: Top three calculators ? - Archilog - 09-08-2019, 03:18 AM
RE: Top three calculators ? - toml_12953 - 09-14-2019, 03:51 PM
RE: Top three calculators ? - Marco Polo - 09-14-2019, 08:07 PM
RE: Top three calculators ? - Domino - 06-20-2019, 10:34 AM
RE: Top three calculators ? - jlind - 09-08-2019, 08:43 AM
RE: Top three calculators ? - edryer - 09-08-2019, 08:19 PM
RE: Top three calculators ? - Luigi Vampa - 10-29-2020, 09:53 PM
RE: Top three calculators ? - HP67 - 09-12-2019, 08:32 PM
RE: Top three calculators ? - badaze - 09-14-2019, 01:23 PM
RE: Top three calculators ? - BusyCalc - 09-13-2019, 06:33 AM
RE: Top three calculators ? - HP67 - 09-14-2019, 08:46 PM
RE: Top three calculators ? - Marco Polo - 09-15-2019, 08:35 AM
RE: Top three calculators ? - toml_12953 - 09-15-2019, 02:17 PM
RE: Top three calculators ? - groskwik - 09-15-2019, 09:16 PM
RE: Top three calculators ? - tom234 - 10-29-2020, 05:45 PM
RE: Top three calculators ? - Mike T. - 10-29-2020, 10:40 PM
RE: Top three calculators ? - grsbanks - 10-30-2020, 09:46 AM
RE: Top three calculators ? - CMarangon - 10-31-2020, 06:39 PM
RE: Top three calculators ? - WesPerdue - 11-03-2020, 09:28 AM
RE: Top three calculators ? - vaklaff - 11-03-2020, 01:16 PM
RE: Top three calculators ? - WesPerdue - 11-03-2020, 05:34 PM
RE: Top three calculators ? - Davidy - 11-14-2020, 02:48 AM
RE: Top three calculators ? - ttw - 11-14-2020, 03:20 AM
RE: Top three calculators ? - EdS2 - 11-15-2020, 11:08 AM
RE: Top three calculators ? - Mike T. - 04-26-2021, 10:01 PM
RE: Top three calculators ? - OtakuLab - 11-17-2020, 12:24 PM
RE: Top three calculators ? - Peet - 01-08-2021, 08:32 AM
RE: Top three calculators ? - lmmt61 - 01-08-2021, 09:06 AM
RE: Top three calculators ? - Coco - 01-08-2021, 05:10 PM
RE: Top three calculators ? - MNH - 01-09-2021, 05:22 AM
RE: Top three calculators ? - MNH - 01-09-2021, 01:34 PM
RE: Top three calculators ? - Chr Yoko - 01-09-2021, 01:48 PM
RE: Top three calculators ? - Gilles - 01-09-2021, 08:30 PM
RE: Top three calculators ? - Uli - 01-09-2021, 10:41 PM
RE: Top three calculators ? - Sukiari - 01-10-2021, 07:17 AM
RE: Top three calculators ? - OlidaBel - 04-27-2021, 07:54 AM
RE: Top three calculators ? - isanchez - 05-03-2021, 06:46 AM
RE: Top three calculators ? - Dave Britten - 05-04-2021, 02:28 PM
RE: Top three calculators ? - HP-71C - 08-26-2021, 09:33 PM
RE: Top three calculators ? - BusyCalc - 08-27-2021, 10:55 AM
RE: Top three calculators ? - Ren - 08-27-2021, 01:20 PM
RE: Top three calculators ? - Ren - 08-30-2021, 03:49 PM
RE: Top three calculators ? - polbit - 09-04-2021, 12:47 PM
RE: Top three calculators ? - Nihotte(lma) - 09-05-2021, 01:11 PM
RE: Top three calculators ? - Helix - 09-06-2021, 11:23 PM
RE: Top three calculators ? - Ren - 10-24-2021, 02:03 AM
RE: Top three calculators ? - Liamtoh Resu - 10-22-2021, 04:49 AM
RE: Top three calculators ? - Alevin - 10-23-2021, 06:52 PM
RE: Top three calculators ? - tangdfx - 03-27-2022, 06:25 AM



User(s) browsing this thread: 1 Guest(s)