Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   indexof functions (https://forums.graalonline.com/forums/showthread.php?t=40928)

Python523 12-04-2002 09:48 AM

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?

emortylone 12-04-2002 10:07 AM

LOL, new features I see. I still say it's about useless, for command is just as easy for me ;)
---Shifter

Python523 12-04-2002 10:16 AM

shifter, they already exist, i want them to return arrays instead

Kaimetsu 12-04-2002 10:21 AM

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.

Admins 12-20-2002 03:11 AM

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


All times are GMT +2. The time now is 03:30 PM.

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