The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need a more efficient function
Author Message
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #6
RE: I need a more efficient function
LIST is global like VAR, it is permanent (they are saved in spheredata.scp like VARs are.)

I originally implemented the entire thing in TAGs but it was a huge pain to manage mixed (string/numeric) values and the LIST functions manage all that automatically. Its also trivial to build multi-dimensional arrays using LIST and doing that in TAGs is nightmarish due to the parsing of the delimiter characters etc.

The problem with the code above is that sometimes the last comparison causes the FOR loop to reverse (it essentially becomes FOR x 1 0) and then CardA becomes invalid because its looking at LIST[-1] (which is invalid) or something like that.

This is line 121:

Code:
LOCAL.CardA="<STRSUB 1 2 <LIST.<LOCAL.Input>.<EVAL <LOCAL.LoopNumber>-1>>>"
(This post was last modified: 07-11-2012 09:10 AM by RanXerox.)
07-11-2012 09:07 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: I need a more efficient function - RanXerox - 07-11-2012 09:07 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)