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-nmm7 (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-nmm7 (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-nmm7 (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
Variables in Defname
Author Message
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #6
RE: Variables in Defname
There is always workarounds like this one...

Code:
[FUNCTION DEFVAL]
LOCAL.STRING Ð<ARGS>
WHILE (<STRPOS 0 60 <LOCAL.STRING>> > -1)
LOCAL.LAST <STRLASTPOS 60 <LOCAL.STRING>>
LOCAL.NEXT <EVAL <STRPOS <LOCAL.LAST> 62 <LOCAL.STRING>>+-<LOCAL.LAST>>
LOCAL.STRING <STRSUB 0 <LOCAL.LAST> <LOCAL.STRING>><<STRSUB <EVAL <LOCAL.LAST>+1> <EVAL <LOCAL.NEXT>+-1> <LOCAL.STRING>>><STRSUB <EVAL <LOCAL.LAST>+<LOCAL.NEXT>+1> 0 <LOCAL.STRING>>
ENDWHILE
LOCAL.STRING <STRSUB 1 0 <LOCAL.STRING>>
RETURN <LOCAL.STRING>

[FUNCTION STRLASTPOS]
LOCAL.CHAR <STRARG <ARGS>>
LOCAL.NEWSTRING <STREAT <ARGS>>
WHILE (<STRPOS 0 <dLOCAL.CHAR> <LOCAL.NEWSTRING>> > -1)
LOCAL.LASTCHAR <EVAL <STRPOS 0 60 <LOCAL.NEWSTRING>>>
LOCAL.NEWSTRING <STRSUB 0 <STRPOS 0 <dLOCAL.CHAR> <LOCAL.NEWSTRING>> <LOCAL.NEWSTRING>>#<STRSUB <EVAL <STRPOS 0 <dLOCAL.CHAR> <LOCAL.NEWSTRING>>+1> 0 <LOCAL.NEWSTRING>>
ENDWHILE
RETURN <EVAL <LOCAL.LASTCHAR>>

Not sure if it still works, but I created this to emulate the PHP function eval().
So you can do something like this... <defval <def0.lol>> and it will evaluate any variables inside the def Smile

Use at your own risk Big Grin

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
05-17-2012 09:56 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Variables in Defname - alexpetro - 05-05-2012, 07:36 PM
RE: Variables in Defname - Shaklaban - 05-06-2012, 01:01 AM
RE: Variables in Defname - jeem - 05-06-2012, 03:51 AM
RE: Variables in Defname - alexpetro - 05-17-2012, 01:09 AM
RE: Variables in Defname - Shaklaban - 05-17-2012, 01:27 AM
RE: Variables in Defname - Ben - 05-17-2012 09:56 AM

Forum Jump:


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