Yep, good thing, that was already in my mind and at some day I will definitely implement it! I only have barely free time these days, so it might take a while Wink
In Case of Emergency (ICE..), you can join #icedev for (almost) instant help Smile
Join this channel as well for discussion about ICE, features, updates etc
PT_ wrote:
In Case of Emergency (ICE..), you can join #icedev for (almost) instant help Smile
Join this channel as well for discussion about ICE, features, updates etc


PT_, you are hilarious! Very Happy Very Happy Very Happy Very Happy Very Happy

BTW, i recently started using ICE and i love it <3 (Also, i am the one who made that IRC channel, so dont let PT_ take all the credit for it Razz )
I heard that you were implementing ICE in C; here are some recomendatations:

    Use functions! Very Happy
    Split into multiple files! Very Happy
    Also I made this nifty function for just this purpose for ICE: ti_GetTokenString
    Use structures; not global variables!
    Use local variables Smile
    Don't create crazy looking code. There's usually a much better way Razz


Anyway; best of luck!
This is how I read your recommendations:

使用功能! 很高興
分割成多個文件! 很高興
此外,我為ICE的這個目的製作了這個漂亮的功能:ti_GetTokenString
使用結構; 不是全局變量!
使用局部變量微笑
不要創建瘋狂的代碼。 通常有一個更好的方式Razz

Razz

Thanks anyway, I hope to get more progress soon!
So well, yeah, time for some updates, or whatever you call it. As you might already know, I'm recreating ICE in C to make development faster, and easy add new features. This is coming along very well, I need to say. Currently numbers, variables, operators and parenthesis are supported (still need code for every operator), and more are coming soon. However, I'm running into a huge problem, and that are C functions. They are not like 'normal functions', such as not( and remainder( and so on. For the last type of tokens, I just add code for every possible argument type(s), rather than using the stack, like C functions need. However, this method simply doesn't apply to C functions, as they are supposed to take the input (arguments) from the stack, not registers etc. Thus, with the Shunting Yard Algorithm I'm doing, it is VERY hard to add C functions, and I'm not sure yet how to solve this. Let's take a look at some example:

Code:
det(2,det(15,X+2->X                 2 15 X 2 + det( det( X ->

det(2,det(15,X)+2->X                2 15 X det( 2 + det( X ->

det(2,det(15),X+2->X                2 15 det( X 2 + det( X ->

det(2,X+det(15),2->X                2 X 15 det( + 2 det( X ->

det(2,X,2*det(15))+3->X             2 X 2 15 det( * det( 3 + X ->

2*det(15,X)+3->X                    2 15 X det( * 3 + X ->

det(2,X+2,1,2,3                     2 X 2 + 1 2 3 det(

Left is the input, right is the input in infix notation.

Now let's take my last example. If I just parse them as normal, first the "+" is parsed, so X+2, but since the output isn't used in the next 2 elements (as an operator or function), the output is pushed to the stack, and that is where problems arise, it should not even parse the +. First 3, then 2, then 1 should be pushed, afterwards X+2 parsed and pushed, then the det( function will be called.

Again, I've no idea how to solve this, and I'm open for any ideas! Smile


Progress: I've added icon and description support:
Actually, I had a couple questions about possible additions. A way to get a one bit of a number/variable. For example, if we have the number 1050 (10000011010 in binary), the command GetBit(1050,1) would return 0, while GetBit(1050,2) would return 1. I'm not sure how easy/feasible this would be, but I think it would be really useful for storing more information in an integer.
Bug report:
Pressing [On] while taking input = Crash.

Here's the exact code I was using:

Code:
[i]CE
Input A
Pause A


I hit [on] at the Input command.
_iPhoenix_ wrote:
Bug report:
Pressing [On] while taking input = Crash.

Here's the exact code I was using:

Code:
[i]CE
Input A
Pause A


I hit [on] at the Input command.
.
Presumably, there is no error checking and stuff, which wastes time. Just don't press on.

Also, for the icons and descriptions, how are those inserted into the code, could you provide an example of a program to see how to add a description/icon?
mr womp womp wrote:
Also, for the icons and descriptions, how are those inserted into the code, could you provide an example of a program to see how to add a description/icon?

It doesn't work yet; that is for the C version of ICE. Wink
CodertheBarbarian wrote:
Actually, I had a couple questions about possible additions. A way to get a one bit of a number/variable. For example, if we have the number 1050 (10000011010 in binary), the command GetBit(1050,1) would return 0, while GetBit(1050,2) would return 1. I'm not sure how easy/feasible this would be, but I think it would be really useful for storing more information in an integer.

Hmm might be a good idea, will think about it, but the C version has my priority Smile

Yeah, you should not press [ON] while at Input, that will indeed cause a crash, same thing with an error in running a BASIC program. Razz
I've added setting BASIC vars from ICE Very Happy

PT_ wrote:
I've added setting BASIC vars from ICE Very Happy



OOOoo this is a good one, now ICE programs are easier to mesh into basic programs!
mr womp womp wrote:
PT_ wrote:
I've added setting BASIC vars from ICE Very Happy



OOOoo this is a good one, now ICE programs are easier to mesh into basic programs!


And now i can have my game save and stuff Razz
I'm SUUUUUPPEERRRRR excited to announce this very great news:

http://ice.cemetech.net

It redirects you to a page at Cemetech Learn, where I will put all the needed information, and Tips and Tricks! Very Happy
I've uploaded another update of ICE, still v1.5, which adds GetBASICVar(, which is... the reverse of SetBASICVar( Wink For now, it's the last version until I've finished the C version, which adds some other nice functions (I hope so Razz)

https://www.cemetech.net/programs/index.php?mode=file&path=/84pce/asm/ICECompiler.zip
Time for some quick updates about my C version: I've implemented all the operators, and added code for functions, which work fine, I only need to add them Razz Chaining things also work, so the only thing I need to do is doing weird stuff with C functions and get that working Smile
ICE has been updated with some small changes, and one big change. Instead of pressing [ENTER] at the ICE homescreen, you can now press [+] as well. This does the same, compiling, but add some code to it that allows you to track the label flow! So, run the output program, quit it, and ICE has created a new program, "LOG", with all the passed Lbl/Goto/(Calls = Goto)'s in it. This should make it a bit easier to track the code Smile
I think this is a bug with ICE,
For some reason, a program I never touched with ICE installed got changed.
It changed every 'Sy' with 'GetBasicVar('
I changed it back, but I'm a little worried what else might have been changed with other programs.
Any idea why this would occur? Confused
No that is just the hook it installs. It replaces [Sy] everywhere, as well as some other tokens. Don't worry, you program still works fine, you only discovered a custom token of ICE Wink
  
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
» Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 31, 32, 33  Next
» View previous topic :: View next topic  
Page 12 of 33
» 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