Code: Select all
Procedure ddd(text.s)
Debug text
EndProcedure
Procedure fff()
!function test(){
!f_ddd('1234');
!}
!test();
EndProcedure
fff()
Code: Select all
Procedure ddd(text.s)
Debug text
EndProcedure
Procedure fff()
!function test(){
!f_ddd('1234');
!}
!test();
EndProcedure
fff()
Code: Select all
Procedure ddd(text.s)
Debug text
EndProcedure
Procedure fff()
!function test(){
!f_ddd('1234');
!}
!test();
EndProcedure
ddd("") ; force SB To compile!!
fff()
It's going to be a problem when people start using Cordova plugins, because even with the linker optimization bypassed and everything defined SB still uses a non-global scope and Cordova uses out of scope asynchronous callbacks.PartTimeCoder wrote:Its not a scope issue, SpiderBasic does not compile procedures that are not called in SB code so your example will not work, adding a call to the function makes SB compile the proc and it calls from JS, strange behaviour!!
Code: Select all
Procedure ddd(text.s) Debug text EndProcedure Procedure fff() !function test(){ !f_ddd('1234'); !} !test(); EndProcedure ddd("") ; force SB To compile!! fff()
Code: Select all
If 1 = 2
ddd("") ; force SB To compile!!
EndIf