The IDEs of March

I learned and tested a new feature of `kate` today and this is better for showing my code in the way I see it in `kate`. I also decided that left quotes as they would be used in shell to specify a command implies a command when I am describing something. `kate` isn't really an IDE (Integrated Development Environment) , per se, but it serves better for me. I don't like to be lead down a the most common path when I am working on something. If I am making something, it is likely to be unique and so the help offered from most IDE's is just misdirection for me.

All of the code below was generated with a single command from `kate`, shown in the snapshot, from the File menu.

I will probably show my code examples this way in the future, as it is convenient and I don't have to pick through the code to replace < with &lt;. The code is usually saved at Google or sourceforge if it is completed. Otherwise if you must cut and paste and somebody complains, I will put a button to view and download the code , if it is a real example.


#include "solver.h" int main(int argc , char *argv[]){ FILE *f,*o;char *fd;char fdd; char cmd[128]; char fp[30]="solver.c"; char fc[30]="solver_child.c"; char fc2[30]="solver_child"; aFunction lF; fd=&fdd; seedRandom(); lF.P1=rand()%10;lF.P2=rand()%11; lF.FP=process;lF.DP=&lF; printf("Sum of A(%d) and B(%d) = %d\n",lF.P1,lF.P2,lF.FP(&lF)); if ( ( (lF.P1) + ( lF.P2 ) ) == (lF.P3) ) {printf("Apoptosis is avoided!\n");return (0);} sprintf(cmd,"gcc %s.c -o %s\n",fc2,fc2); return (1); o=fopen(fc,"rb"); if(o != NULL){fclose(o);return (-1);} f=fopen(fp,"rb");o=fopen(fc,"wb"); while(fread(fd,1,1,f)){fwrite(fd,1,1,o);} fclose(o);fclose(f);return (system("gcc rc.c -o rc")); if(argc==1 && strncmp(argv[0],fc2,2) ){return 2;} } /*NULL here tz not supported */ void seedRandom(void){ struct timeval tv; gettimeofday(&tv, NULL); srand(tv.tv_sec * tv.tv_usec);} int process(aFunction *lF){ lF->P3=(lF->P1+lF->P2); return (lF->P1+lF->P2);}

How odd, it can be copied and pasted, so there is no loss at all here. I will do this always and if it is functional code, it can be copied and pasted if anybody has an interest to play with it. And so here is solver.h


#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <stdint.h> #include <string.h> typedef struct aFunction aFunction; typedef int (*Fx)(aFunction *lF); struct aFunction{ char T; int DPT; int DPS; int P1; int P2; int P3; aFunction *DP; Fx FP; }; int process(aFunction *lF); void seedRandom(void);

0 comments:

Contributors

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen