Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
20 May, 2013, 02:17:44 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Isn't the 'input' function rather useless? - ...with variable length tokens  (Read 360 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 19:52:49
Date Registered: 02 July, 2009, 06:38:05
Posts: 1679


Total Post Ratings: +492

View Profile
« on: 14 April, 2012, 23:10:09 »
+1

In the current state of Axe, I agree, the input comamnd is a little lacking in terms of supporting commands. It returns a string of tokens, but there are no Axe commands to handle strings of tokens...


However, you can always make your own. Smiley Here's a routine I whipped up to return 1 if a token pointed to is a 2-byte token, or 0 if it's a 1-byte token.


1
2
3
4
.INPUT=pointer to token
Lbl Is2B
Return inData({},[BB5C5D5E606162637EAAEF00])+255/256

You could then call this routine from another routine, like this routine I wrote to print a length-prefixed string of tokens (that's what the input command returns) to the screen/buffer:


1
2
3
4
5
6
7
8
.INPUT=pointer to first token
Lbl Print
→r₁+{-2}ʳ→r₂
Lbl PL
Return!If -r₁
Text Select(r₁,+Is2B()+1→r₁)►Tok
r₂:Goto PL
« Last Edit: 14 April, 2012, 23:11:27 by Runer112 » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.196 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.