agraham Expert Licensed User Longtime User Oct 5, 2010 #61 Sorry, I'm doing too many things at once at the moment. Should be OK now.
A aroom Member Licensed User Oct 5, 2010 #62 it is ok. sql query string run! agraham, thank you very much.
A aroom Member Licensed User Oct 7, 2010 #63 A program starts with an initial code section at the beginning of the program. All Subs must follow this code section. Execution commences at the first line of the program and ends when AppClose is executed or if the code tries to run off the end of this initial section into the first Sub. Click to expand... could program run over Sub define part, to the AppClose or file end ? because Sub define in multiple script files, and files to be load one by one. thanks.
A program starts with an initial code section at the beginning of the program. All Subs must follow this code section. Execution commences at the first line of the program and ends when AppClose is executed or if the code tries to run off the end of this initial section into the first Sub. Click to expand... could program run over Sub define part, to the AppClose or file end ? because Sub define in multiple script files, and files to be load one by one. thanks.
agraham Expert Licensed User Longtime User Oct 8, 2010 #64 aroom said: could program run over Sub define part, to the AppClose or file end ? Click to expand... No, the structure of the interpreter makes that difficult to implement. However I don't see why you would need to. A script cannot be partially loaded into the interpreter so if you are building a script at runtime you just need to assemble it in the required order.
aroom said: could program run over Sub define part, to the AppClose or file end ? Click to expand... No, the structure of the interpreter makes that difficult to implement. However I don't see why you would need to. A script cannot be partially loaded into the interpreter so if you are building a script at runtime you just need to assemble it in the required order.
A aroom Member Licensed User Oct 27, 2010 #65 Code: Copy dateformat("yyyy-mm-dd") date(now) return: 2010-53-27 (53 > 12, bug) BTW, 1. could I define Sub name with dot pair like the oriented-object program style? Code: Copy Sub myObject.method(p1, p2) ...... End 2. define in Sub (paramList), it is perfect that paramList can use Option parameter! with one or more parameters only need write one Sub routine, the same as the Lisp style. Code: Copy Sub fun(p1, [p2], [p3]) sum = p1 if isnumber(p2) = true then sum = sum + p2 end if if isnumber(p3) = true then sum = sum + p3 end if return sum End fun(1) -> 1 fun(1, 2) -> 3 fun(1, 2, 3) -> 6 thanks.
Code: Copy dateformat("yyyy-mm-dd") date(now) return: 2010-53-27 (53 > 12, bug) BTW, 1. could I define Sub name with dot pair like the oriented-object program style? Code: Copy Sub myObject.method(p1, p2) ...... End 2. define in Sub (paramList), it is perfect that paramList can use Option parameter! with one or more parameters only need write one Sub routine, the same as the Lisp style. Code: Copy Sub fun(p1, [p2], [p3]) sum = p1 if isnumber(p2) = true then sum = sum + p2 end if if isnumber(p3) = true then sum = sum + p3 end if return sum End fun(1) -> 1 fun(1, 2) -> 3 fun(1, 2, 3) -> 6 thanks.
agraham Expert Licensed User Longtime User Oct 27, 2010 #66 1) Use dateformat("yyyy-MM-dd") Sorry, it's a documentation failure rather than a bug. DateFormat and TimeFormat in Basic4ppc and BasicLib use the .NET standard formatting characters Custom DateTime Format Strings so you can use TimeFormat for dates and DateFormat for times if you want. However for DateFormat Basic4ppc converts any "m" to "M" because "m" is minutes and "M" is months. For TimeFormat Basic4ppc changes "M" to "m" for the same reason. I chose not to do this in BasicLib so DateFormat and TimeFormat are identical but maintain separate formatting strings so you can keep two different date/time formats defined. 2) I'm afraid not. 3) I'm afraid not. However you could get a similar effect by putting the parameters in an global array, pass the name of the array variable as the parameter and use GetLen and GetItem to access the array. Or you could just have the Sub assume which array to use.
1) Use dateformat("yyyy-MM-dd") Sorry, it's a documentation failure rather than a bug. DateFormat and TimeFormat in Basic4ppc and BasicLib use the .NET standard formatting characters Custom DateTime Format Strings so you can use TimeFormat for dates and DateFormat for times if you want. However for DateFormat Basic4ppc converts any "m" to "M" because "m" is minutes and "M" is months. For TimeFormat Basic4ppc changes "M" to "m" for the same reason. I chose not to do this in BasicLib so DateFormat and TimeFormat are identical but maintain separate formatting strings so you can keep two different date/time formats defined. 2) I'm afraid not. 3) I'm afraid not. However you could get a similar effect by putting the parameters in an global array, pass the name of the array variable as the parameter and use GetLen and GetItem to access the array. Or you could just have the Sub assume which array to use.