Author Topic: AUTO_EVAL_STRINGS oddities  (Read 1309 times)

Offline K4thos

  • Planewalker
  • *****
  • Posts: 110
AUTO_EVAL_STRINGS oddities
« on: December 20, 2015, 09:34:59 PM »
Readme states that AUTO_EVAL_STRINGS command:
Quote
If used, an EVALUATE_BUFFER is implied everywhere possible. In particular, you can now "forget" about using it in FUNCTIONs and arrays.

I've tried to use following tp2 test code:
Code: [Select]
BACKUP ~test/backup~
AUTHOR ~K4thos (swit)~
VERSION ~beta 0.1~

AUTO_EVAL_STRINGS

BEGIN ~test~
NO_LOG_RECORD

OUTER_SPRINT test1 ~VARNAME~
OUTER_SPRINT test2 ~LOCALS~
OUTER_SPRINT test3 ~7~

<<<<<<<< .../test.baf
IF
  Global("%test1%","GLOBAL",0)
  Global("dummy","%test2%",1)
  Global("dummy","GLOBAL",%test3%)
THEN
  RESPONSE #100
    Continue()
END
>>>>>>>>

COMPILE ~.../test.baf~
For some reason the outcome script looks like this:
Code: [Select]
IF
  Global("%test1%","GLOBAL",0)
  Global("%test2%dummy","",1)
  Global("dummy","GLOBAL",157479)
THEN
  RESPONSE #100
    Continue()
END

but all variables are evaluated correctly if I use either:
Code: [Select]
COMPILE EVAL ~.../test.baf~or
Code: [Select]
COMPILE ~.../test.baf~ EVALUATE_BUFFERWhy is that? I though AUTO_EVAL_STRINGS command supposed to do exactly the same thing as EVAL? If no than the description probably needs some carification.
« Last Edit: December 21, 2015, 07:02:56 AM by K4thos »

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: AUTO_EVAL_STRINGS oddities
« Reply #1 on: December 28, 2015, 03:00:25 PM »
AUTO_EVAL_STRINGS only implies EVAL in a string context. The description will be clarified.

Offline K4thos

  • Planewalker
  • *****
  • Posts: 110
Re: AUTO_EVAL_STRINGS oddities
« Reply #2 on: December 31, 2015, 07:34:55 AM »
any chance for a new command called AUTO_EVAL_VARIABLES that would behave like EVALUATE_BUFFER added to COMPILE / EXTEND_TOP / EXTEND_BOTTOM? Thanks in advance.
« Last Edit: December 31, 2015, 07:48:03 AM by K4thos »

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: AUTO_EVAL_STRINGS oddities
« Reply #3 on: January 03, 2016, 10:26:41 AM »
The best I can tell you is that I can inter this request (automatic EVAL for scripts in some form) in the feature mausoleum, where hope goes to die.

Offline K4thos

  • Planewalker
  • *****
  • Posts: 110
Re: AUTO_EVAL_STRINGS oddities
« Reply #4 on: January 03, 2016, 01:52:57 PM »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: