Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-04-2003, 11:12 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
arrays

String arrays have deletestring arrayname,index

and

removestring arrayname,string


I want the same things for numeric arrays


deleteelement array,index;

removeelement array,#;


not sure about those names though.

Basially you could delete any index in the array and it would reindex everything and be all good.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #2  
Old 05-10-2003, 11:06 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Both can easily be done with a small script.
__________________
[signature]insert here[/signature]
Reply With Quote
  #3  
Old 05-10-2003, 11:52 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by screen_name
Both can easily be done with a small script.
Depends on your definition of small. But I'd rather have a command that will do it easily for any array I wanna alter.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #4  
Old 05-11-2003, 01:46 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Just create a function that you can copy and paste into your scripts. I have one that does that, but I'm sure you can script it.
Reply With Quote
  #5  
Old 05-11-2003, 06:53 PM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
Trevor empty out your PMs or im me -.-
I really need to talk to you
Reply With Quote
  #6  
Old 05-11-2003, 08:24 PM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
Built-in functions are better, they take less time. Its more efficient to have a command to do this for you than do it yourself, because your script needs to be parsed, the command is built-in.
__________________

subliminal message: 1+1=3
Reply With Quote
  #7  
Old 05-11-2003, 11:42 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by Falados
Built-in functions are better, they take less time. Its more efficient to have a command to do this for you than do it yourself, because your script needs to be parsed, the command is built-in.
It hardly takes much time. I see what your saying, but it doesn't take enough time to really matter.

Quote:
Originally posted by Alexander
Trevor empty out your PMs
Done.
Reply With Quote
  #8  
Old 05-12-2003, 01:56 AM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
Quote:
Originally posted by tlf288


It hardly takes much time. I see what your saying, but it doesn't take enough time to really matter.



Done.
What if you had a fairly large array? Or what if your array manipulation was in conjunction with other resource-heavy operations, you mustn't denounce solutions to lag you know.
__________________

subliminal message: 1+1=3
Reply With Quote
  #9  
Old 05-12-2003, 02:07 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Ok, yes I know I could make some functions to do this, but, I'm hoping stefan's built in functions won't be so very laggy as the functions would no doubt have to me, using at least a for loop, and the arrays would be pretty large. I could use temporary string arrays, but those lag pretty badly when the size gets decent. And I would need multiple functions for multiple arrays. One function to translate each array, and one function to do each operation.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #10  
Old 05-12-2003, 02:50 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
If you don't care about ordering then deletion/replacement is a piece of cake - you don't even need a for loop. My problem with these functions is that Stefan would need to make them care about ordering at all times (just in case) and so they would be far less efficient than a custom-scripted function.
__________________
Reply With Quote
  #11  
Old 05-12-2003, 03:40 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by Kaimetsu
If you don't care about ordering then deletion/replacement is a piece of cake - you don't even need a for loop. My problem with these functions is that Stefan would need to make them care about ordering at all times (just in case) and so they would be far less efficient than a custom-scripted function.
Well, I do care about ordering so, yeah...
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #12  
Old 05-12-2003, 07:54 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by adam
Well, I do care about ordering so, yeah...
Indeed? What are you coding?
__________________
Reply With Quote
  #13  
Old 05-13-2003, 05:49 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by Kaimetsu


Indeed?
Almost everything I code depends on ordered arrays. I mean, isn't the point of an array to store ordered data?
Reply With Quote
  #14  
Old 05-13-2003, 06:03 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by tlf288
Almost everything I code depends on ordered arrays. I mean, isn't the point of an array to store ordered data?
No, the point is merely to store data.
__________________
Reply With Quote
  #15  
Old 05-13-2003, 07:15 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by Kaimetsu


Indeed? What are you coding?
You remember your thread about random not being random? I used string arrays to do what im asking for the ability to do in arrays more easily.

It's just something I think will improve the use of arrays generally, for any sort of listing purposes. or sequential data.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #16  
Old 05-13-2003, 07:49 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by adam
You remember your thread about random not being random?
Yes.

Quote:
I used string arrays to do what im asking for the ability to do in arrays more easily.
Now I don't know what you're saying. Are you referring to a project mentioned in the random() thread? The fireworks thing? Why would they need to be ordered? And it's horribly foolish to use a string array - just code your own damn function.

Quote:
It's just something I think will improve the use of arrays generally, for any sort of listing purposes. or sequential data.
No, it won't. 90% of arrays don't need to be ordered, and use of this function would slow them down immensely.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.