Just starting out? Need help? Post your questions and find answers here.
-
the.weavster
- Posts: 229
- Joined: Sat Mar 01, 2014 3:02 pm
Post
by the.weavster »
gets translated to
rather than
I think this
might have an implication for the inference engine, for example if you did something like this:
Code: Select all
js = #Null
!v_js = {"FirstName":"John","LastName":"Bull"};
it would get translated to this:
Code: Select all
var v_js = 0;
v_js = {"FirstName":"John","LastName":"Bull"};
I think the fact we've just changed the data type of the variable might cause Firefox to kick our compiled code back down to the interpreter.
-
Fred
- Site Admin
- Posts: 1820
- Joined: Mon Feb 24, 2014 10:51 am
Post
by Fred »
While I understand you point, #Null in SB is 0, not null. If you need the null value in custom JS code, better write it in inlined JS !
-
the.weavster
- Posts: 229
- Joined: Sat Mar 01, 2014 3:02 pm
Post
by the.weavster »
Ah, I didn't realise this would work

:
Code: Select all
!var v_sayhello = "Hello, World!";
Debug sayhello
I thought I had to initialise the variable in SpiderBasic and only then would it be available for passing back and forth with JS using the v_ prefix.
-
Fred
- Site Admin
- Posts: 1820
- Joined: Mon Feb 24, 2014 10:51 am
Post
by Fred »
Would not work with EnableExplicit though.