I had an idea regarding string indexing: since $string.val always sets/returns a byte, maybe there could be to set/return multi-byte values from string indexing. This would simplify what otherwise turns into a bunch of pretty stupid bitshift constructs (As Seen In & Code Screenshots). Possible methods (in order of author's preference):
1) .word[ind], .counter[ind]
set "counter" $string.counter(32)"
2) .ind#1-4 (4 signed, others unsigned)
set "counter" "$string.32#4"
3) .ind[ub (default), b, uw, w, c/s]
set "counter" "$string.32c"
4) New operators (yeah, like we need to give strings MORE special chars)
yeah I have nothing, suggest something if you think this is a good idea, but I don't think it is
5) ?????
Report ID | 466 | Title | Returning words and "counters"/shorts via string indexing |
Product | Archived Requests | Status | Implemented (Severity 1 - Low) |
Version | 2.84 | Fixed in | 2.91 |
Page 1 of 1
Report ID #466: Returning words and "counters"/shorts via string indexing
#1 Lachesis
Posted 31 May 2012 - 02:32 AM
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
Page 1 of 1
Replies (1 - 8)
#2 Dr Lancer-X
Posted 31 May 2012 - 03:04 AM
I like the first one, it doesn't break the existing model, would be useful and shouldn't be too much work to implement.
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#3 Lachesis
Posted 31 May 2012 - 04:49 AM
I think the only issue is that indexing by bytes may potentially confuse users not used to the number of bytes in words/shorts or the concept of little endian, but those users probably wouldn't be using strings anyway.
This is simple enough it could probably make 2.84 except that Terryn would have to cram more things into the help file last minute. 2.85 is just something I put down, but 2.84b is reasonable since the chance of anybody having used "$string.counter103" in a previous game is essentially non-existant.
This is simple enough it could probably make 2.84 except that Terryn would have to cram more things into the help file last minute. 2.85 is just something I put down, but 2.84b is reasonable since the chance of anybody having used "$string.counter103" in a previous game is essentially non-existant.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#4 ajs
Posted 31 May 2012 - 05:56 PM
I'd would recommend not hacking in string to counters using bytewise addressing. Robotic is a high level language and has too many low level features already. Until Exo's proposed language improvements are executed, where stuff like this could be made into built-in functions, I wouldn't add it.
Just my 2c.
--ajs.
Just my 2c.
--ajs.
This post has been edited by ajs: 31 May 2012 - 05:57 PM
#5 Lachesis
Posted 08 December 2012 - 04:26 AM
Updating status to: Rejected
Agree. It's better just to let the game author handle this however they like once functions exist.
Agree. It's better just to let the game author handle this however they like once functions exist.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#6 Lachesis
Posted 08 December 2012 - 05:15 AM
Updating version to: None
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#8 Lachesis
Posted 25 February 2019 - 08:55 PM
Updating status to: Implemented
Updating severity to: 1 - Low
Updating version to: 2.84
Issue fixed in: 2.91
Turns out this was actually implemented as #2 in the initial post and this kind of rules as a feature now we have it. Oops />
Updating severity to: 1 - Low
Updating version to: 2.84
Issue fixed in: 2.91
Turns out this was actually implemented as #2 in the initial post and this kind of rules as a feature now we have it. Oops />
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
Page 1 of 1
2 User(s) are reading this issue
2 Guests and 0 Anonymous Users
Powered by IP.Tracker 1.3.2 © 2025 IPS, Inc.