0 Members and 7 Guests are viewing this topic.
I forgot to address the break and continue idea. Those are both definitely possible, it could even be used in If and Switch statements which would be cool. Finding a token in a convenient menu might be a challenge though.
::A*12+(B/8) .The last expression used becomes the switch statement automatically:Case 0: .Function1:Case 83: .Function2:Case -1: .Function3:End:
HoMM: [==--------] Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :PtiDE: [----------] Explored and understood the main part of the code: just started writing a Tokenizer.
"HELLO"->Str1Str1+" WORLD"->Str1
See the TI-Basic code below:Code: [Select]"HELLO"->Str1Str1+" WORLD"->Str1Can this be done in Axe? How?And, as for the Bitmap( command, it says the structure pointed to should be width x height x rows of img. What does this mean exactly? Let's say I wanted a blank sprite that is 7x7 pixels. How should my arguments for Bitmap look (The X and Y can be an arbitrary X and Y)?
.Data initialization"HELLO"->Str1Zeros(6)" WORLD"->Str2.Code to append Str2 to Str1.Copies length(Str2)+1 bytes to include null terminatorCopy(Str2,length(Str1)+Str1,length(Str2)+1)
I also have a feature request. A function for _Insertmem and _Delmem (with a warning to use wisely )
Here's a way to do what you said, I think. Note that extra data bytes are inserted after Str1 is defined. This is important! Otherwise the new data at Str1 would overflow into other data.Code: [Select].Data initialization"HELLO"->Str1Zeros(6)" WORLD"->Str2.Code to append Str2 to Str1.Copies length(Str2)+1 bytes to include null terminatorCopy(Str2,length(Str1)+Str1,length(Str2)+1)
So, that takes Str1 and adds it to Str2? Writing it into my calculator with a Disp Str2 doesn't return "Hello World"
You need to do Disp Str1. Before that the memory looks like this:"HELLO",0,0,0,0,0,0,0," WORLD",0After that, the memory looks like this:"HELLO WORLD",0," WORLD",0
.AB"Hello"->Str1Zeros(6)" World"->Str2Copy(str2,length(Str1)+Str1,length(Str2)+1)Disp Str1While getkey=/=9End
The InsertMen and DeleteMem commands I was considering to add at one time, but then I realized that you can do basically the exact same thing by creating an appvar, string, program, etc. in ram and then delete it when you're done to get a quick temporary variable without any extra syntax.