0 Members and 2 Guests are viewing this topic.
input - Prompts for an input string just like BASIC then returns a pointer to the string structure. Don't forget, its a string of tokens, not characters.
input->P .store the pointer to the inputdata to var PDisp P
.check length of inputdata to save screen to appvar with user-defined name:Lbl IPTinput->P .get the input for the namelength(P)->L .get the length of the nameIf L > 8 .check the length of the nameDisp "TOO LONG NAME!"Goto IPTEndCopy(P,L5+1,8) .copy the name to L5Copy("appv",L5,1) .set the appv token in front of the nameGetCalc(L5,768)->V .create a new appvarCopy(L6,V,768) .copy screen data to appvar
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.
well, this is how to Disp-lay the inputted text:Code: [Select]input->P .store the pointer to the inputdata to var PDisp Pyou could also check the length or whatever, because the text will be stored to the pointer returned by the input command. I'm not sure where this is exactly, and the last time I heard something about it, Quigibo didn't know it either.Code: (Axe) [Select].check length of inputdata to save screen to appvar with user-defined name:Lbl IPTinput->P .get the input for the namelength(P)->L .get the length of the nameIf L > 8 .check the length of the nameDisp "TOO LONG NAME!"Goto IPTEndCopy(P,L5+1,8) .copy the name to L5Copy("appv",L5,1) .set the appv token in front of the nameGetCalc(L5,768)->V .create a new appvarCopy(L6,V,768) .copy screen data to appvari hope you'll understand it a little more right now, and correct me if I'm wrong (which I don't think, but I know I'm good at making mistakes somtimes )
{input}^r->A/256-48*10*(A>255)+(A^256-48)->A
:"Str1"=>Str1:input=>A //now you can disp A everywhere:lenght(A)=>L:If L<9:GetCalc(Str1,8)=>T:Copy(L5,T,8):Archive Str1:End
Now it displays some tokens before the cursor, and I can use input but the tokens stay there. It doesn't crash though.