Hey its me again (:

I am making a basic text editor for the CE using ICE (I know) I won't be doing a whole lot with it at the moment, but after the 5th, my giant tests are over and ill be able to start doing a lot.

Things I am done with:
- displaying (not optimized)
- cursor movement
- using an appvar as storage instead of a string for chunky programs

Things I am working on:
- File reading (I need help with this, go to the bottom to see what is happening)
- shell support by opening a program with storing it in Ans (I think its done but can't test because problems with file reading)
- editing (basicly done)
- optimization of displaying code so it doesn't loop through every single character in the program scroll

These are the features I plan on adding soon:
- small settings: color changing, text size, cursor speed
- automatic ICE and BASM compilation on exit (might not do this if epilipson does with his shell)
- cut, copy, and paste (multi line later hopefully)
- undo (a bit later)
- indent for loops
- side scrolling for chunky lines

Features that are hopefully going to be added later:
- in-editor sprite editing
- limited redo so I don't have to deal with trees
- variable completion (kind of like tab complete)
- very slight syntax highlight (variables, loops)
- epic ICE things: sum() change to OpenVar() and others


As you can see, its mostly going to be used for ICE, but can be used for other things.

Ok, for file reading, I am having some troubles. I can read the first character with this code, but it freezes after the first one. I made sure to make the file "ABC" and put a bunch of lines and characters in it:

Code:
Sum(2,"ABC","r",5)→FILE         //open

If not(FILE)         //check if a file was opened
det(1          //end program
Return
End

sum(18, FILE)→DATAPTR      //get the address
sum(16,FILE)→SIZE      //get the size

0→I
While SIZE>0
det(19,1,I*10+10      //set text location
det(17,sum(17,°DATAPTR,°LENT,°LENS))      //convert and print tokens
I+1→I
SIZE-LENT→SIZE
End

sum(3,FILE      //close
0→FILE


I tried making it as close as possible to this example of C (thanks to Mr. Lettuce.

Thanks Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement