Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

Scripting library for B4ppc

Reply
 
LinkBack Thread Tools Display Modes
  #61 (permalink)  
Old 10-05-2010, 10:59 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Sorry, I'm doing too many things at once at the moment. Should be OK now.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #62 (permalink)  
Old 10-05-2010, 11:16 AM
Junior Member
 
Join Date: Jan 2010
Posts: 19
Default

it is ok. sql query string run!
agraham, thank you very much.
Reply With Quote
  #63 (permalink)  
Old 10-07-2010, 08:19 PM
Junior Member
 
Join Date: Jan 2010
Posts: 19
Default

Quote:
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.
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.
Reply With Quote
  #64 (permalink)  
Old 10-08-2010, 08:07 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by aroom View Post
could program run over Sub define part, to the AppClose or file end ?
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.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #65 (permalink)  
Old 10-27-2010, 03:23 PM
Junior Member
 
Join Date: Jan 2010
Posts: 19
Default

Code:
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:
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:
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.
Reply With Quote
  #66 (permalink)  
Old 10-27-2010, 04:11 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

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.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Build proper desktop apps in B4PPC with this awesome Forms library agraham Additional Libraries 25 07-30-2008 04:19 PM
B4PPC on USB stick Put Claude Questions (Windows Mobile) 1 01-04-2008 01:33 PM
must B4PPC be installed on C:\ Put Claude Questions (Windows Mobile) 4 01-02-2008 12:05 PM
compression and decompression library or B4PPC Code Louis Questions (Windows Mobile) 1 08-26-2007 07:06 PM
SQLite 3 and b4ppc magi6162 Questions (Windows Mobile) 1 08-23-2007 01:36 PM


All times are GMT. The time now is 10:45 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0