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 12-04-2002, 09:48 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
indexof functions

I want indexof functions like lindexof, aindexof, and indexof to make an array if more than one instance of the character(s) to check for is found, like

this.temp={5,4,3,2,1,5};
this.test = aindexof(5,this.temp);
will make
this.test=0/{0,5} <-- an array

what do you think?

Last edited by Python523; 12-04-2002 at 10:02 AM..
Reply With Quote
  #2  
Old 12-04-2002, 10:07 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
LOL, new features I see. I still say it's about useless, for command is just as easy for me
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #3  
Old 12-04-2002, 10:16 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
shifter, they already exist, i want them to return arrays instead
Reply With Quote
  #4  
Old 12-04-2002, 10:21 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
I don't know if it's completely necessary - it seems a little high-level for me - but if it were to be implemented then it'd need to preserve backwards compatibility. So if this were used:

this.array={0,1,4,2,1,3};
this.indices=indexof(1,this.array);

then this.indices would need to contain 1/{1,4} instead of 0/{1,4}. You probably thought of that already but it wasn't clear in your example.
__________________
Reply With Quote
  #5  
Old 12-20-2002, 03:11 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Making a special function would probably be good though, otherwise you will get problems when comparing it with other variables since it would try to compare it array-wise
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 03:27 PM.


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