I'm trying to run Seek( to set the offset but the offset isn't changing at all. I'm trying to use the code: sum(10,4,0,SLOT). Can anyone tell me how to fix this?
If you are sure SLOT is non-zero (i.e. opening a program work), it should work fine. Tell (sum(14)) should return 4 in this case. Also, are you sure that the variable of SLOT is actually more than 4 bytes large?
Thanks. I forgot that the program was overwriting the variable every time it runs so size changes that i had made earlier were no longer in effect.
I have been try this for a long time

Code:

if Str2="ls"
.....
End


is there another way to do this so it does not have a problem when compiling???
I've created a new release, v2.1.3; many small things are fixed which I didn't test properly (read: not at all Razz). Hopefully everything is fine now! Smile

https://www.cemetech.net/programs/index.php?mode=file&id=1481
Alvajoy123 wrote:
I have been try this for a long time

Code:

if Str2="ls"
.....
End


is there another way to do this so it does not have a problem when compiling???


Try storing your text into another string, and then checking if the strings are equal.
^ On the off chance that doesn't work for you either, you'll just want to compare the byte at each offset from string start. As in:
Code:
Lbl STREQ

[i]: Let theta be our boolean return value

length(Str1)=length(Str2->theta
For(I,0,length(Str1
  ReturnIf not(theta
  *{Str1+I}=*{Str2+I->theta
End

Return

(Perhaps not copy-pastable, being a proof of concept. Up to you to adapt+complete it)


My only reasons for suspecting the suggested method doesn't work are that (a) ICE considers "If Str1=Str2" an Invalid Expression, and (b) storing the expression to some var as in "Str1=Str2->theta" returns garbage that certainly couldn't be construed as a boolean value. That can be verified by doing something like:

Code:
"...->Str1
"...->Str2
Disp Str1=Str2


It's possible I'm missing something obvious, of course!
PT_ wrote:
I've created a new release, v2.1.3; many small things are fixed which I didn't test properly (read: not at all Razz). Hopefully everything is fine now! Smile

https://www.cemetech.net/programs/index.php?mode=file&id=1481

in the trace menu some things have gone blank.
Gone blank, or not there anymore? If you can, can you get a screenshot?
Some commands have been removed, because of some different reasons. There were some commands that were duplicated, but I may be wrong. Correct me if I'm wrong.
I did some crazy stuff, and when I ran my compiled prgm with cesium ram backup, it gliched and gave this error: "OS and App are not compatible..." The whole message flashed up for ~1 sec then the calc reset. I'll try to get some code and a gif up asap, the code had Copy( and Data( in it. After cesium gave an error: memory, I spammed mode and clear until I got to the homescreen. Then I pressed up until the error occurred. I'm on a phone rn, so I'll try and get the error causing code and other stuff up after I get home.
SM84CE wrote:
I did some crazy stuff, and when I ran my compiled prgm with cesium ram backup, it gliched and gave this error: "OS and App are not compatible..." The whole message flashed up for ~1 sec then the calc reset. I'll try to get some code and a gif up asap, the code had Copy( and Data( in it. After cesium gave an error: memory, I spammed mode and clear until I got to the homescreen. Then I pressed up until the error occurred. I'm on a phone rn, so I'll try and get the error causing code and other stuff up after I get home.

EDIT: To answer your queston, you might be using Copy to put too many bytes into a space allocated by Data. Also: Data doesn't work too well if the end is padded with zeroes. Use Alloc(bytes) instead to put a bunch of zeroes

First thing that you mentioned happenned to me when I ran this code:

Code:

sum(2,"A","w",1→D
sum(7,0,D
sum(3,D

Which improperly writes to a type 1 variable named A. I can't remember when it flashes the error, but it does pop up the error, and subsequently resets.
yeah, I slowed down CEmu and replicated the error, here's a pic:
https://drive.google.com/file/d/1xJhpZwoOEwrdGHsrLMdZnqt5yMmVN0Eh/view?usp=sharing

Also, I'm pretty sure the error is due to Data( and Copy('s. I'll retest...
SM84CE wrote:
yeah, I slowed down CEmu and replicated the error, here's a pic:
https://drive.google.com/file/d/1xJhpZwoOEwrdGHsrLMdZnqt5yMmVN0Eh/view?usp=sharing

Also, I'm pretty sure the error is due to Data( and Copy('s. I'll retest...

Looks pretty familliar to me...
EDIT: yea Data only allocates bytes up until the first null (I might be wrong though)
when I used Data(3,0,0,0,0,0,0,0,0,0->... with my CC21 program, it worked fine, I haven't recompiled it yet, might try that in a few days... I double-checked the size of the Data's and Copy's, they were 24 bytes each (8 3-byte entries, all 0). The cc21 code also worked before I implemented save and load, but again, I should probably recompile and check it out... (on CEmu, of course)
SM84CE wrote:
I did some crazy stuff, and when I ran my compiled prgm with cesium ram backup, it gliched and gave this error: "OS and App are not compatible..." The whole message flashed up for ~1 sec then the calc reset. I'll try to get some code and a gif up asap, the code had Copy( and Data( in it. After cesium gave an error: memory, I spammed mode and clear until I got to the homescreen. Then I pressed up until the error occurred. I'm on a phone rn, so I'll try and get the error causing code and other stuff up after I get home.

I can't help if you don't post code.

beckadamtheinventor wrote:
EDIT: To answer your queston, you might be using Copy to put too many bytes into a space allocated by Data. Also: Data doesn't work too well if the end is padded with zeroes. Use Alloc(bytes) instead to put a bunch of zeroes

That doesn't make any sense and I can't believe that. Why would Data( work with 1's and not with 0's at the end?

beckadamtheinventor wrote:
First thing that you mentioned happenned to me when I ran this code:

Code:

sum(2,"A","w",1→D
sum(7,0,D
sum(3,D

Which improperly writes to a type 1 variable named A. I can't remember when it flashes the error, but it does pop up the error, and subsequently resets.

Can't replicate either. Did you recall A and see what kind of variable it was? I used type 2 instead and it created a matrix for me, as supposed to.

beckadamtheinventor wrote:
Looks pretty familliar to me...
EDIT: yea Data only allocates bytes up until the first null (I might be wrong though)

This looks interesting, although I still can't fix things if I don't have code.
Not sure if this is new,
In the program editor, [alpha][f4][trace][clear] (up/down arrows)
The shortcut menus are still open.
Well, I'm thinking about adding a debugger to ICE, where it would trigger the debugger every line or something. What features does it need? Variable/memory viewer/editor? Jump to arbitrary line? Just post your ideas here! Very Happy
PT_ wrote:
Well, I'm thinking about adding a debugger to ICE, where it would trigger the debugger every line or something. What features does it need? Variable/memory viewer/editor? Jump to arbitrary line? Just post your ideas here! Very Happy

All of the above!
Anyone in for writing a post in the ICE Tutorial thread about another hard topic of ICE? I want to write something at least about sprites, ports, debugging and timers, and more if needed. Smile
I could help with the sprite documentation if you want it. Some of the other topics are not my forte but I would be glad to help in any way I can!
  
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 ... 24, 25, 26 ... 31, 32, 33  Next
» View previous topic :: View next topic  
Page 25 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