It is currently Tue Apr 25, 2017 9:13 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 86 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9
Author Message
 Post subject: Re: Hot summer of code
Unread postPosted: Mon Mar 20, 2017 1:18 pm 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1317
Hi Gregor

I tested the APK and it runs well.

Regards Roy
Attachment:
fileSnap.PNG
fileSnap.PNG [ 25.85 KiB | Viewed 559 times ]


Report this post
Top
 Profile  
 
 Post subject: Re: Hot summer of code
Unread postPosted: Fri Mar 24, 2017 5:09 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 299
Hi All,

Some asked me why I use the underscore so often like

"_Source", "_SourceSamples", "_Data"~
, "_Database", "_App", "_AppPath", "_Alarms", "_Dcim", "_Documents"~
, "_Downloads", "_Movies", "_Music", etc.

The Reason is, with the undersore you now at the first look: "This have to do with the BASIC! system :!: "
Behind this are predeffined functions, constants, expressions etc..

Maybe it is also a good suggestion to use the underscore at the end or a better one at the beginning for your predefined elements.

I like this link, too:
https://blog.codinghorror.com/new-programming-jargon/

Happy coding
Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: Hot summer of code
Unread postPosted: Fri Mar 24, 2017 9:04 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 642
Location: UK
aFox wrote:

So do I; thanks for that!

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Hot summer of code
Unread postPosted: Mon Mar 27, 2017 12:30 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 299
BUG BUG BUG

If you use the command DEBUG.DUMP.BUNDLE my version will crash :!:

I hope, I am able to publish the fix soon.
I have to upgrade three Bundle commands, too.
Now I am testing

/ Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: Hot summer of code
Unread postPosted: Tue Mar 28, 2017 11:14 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 299
Hi All

I fixed the issue above.

13. FILE.EXISTS accepts string expressions and values. See description.
Now are no changes in older programs and libs needed.
14. BUNDLE.GET and DEBUG.DUMP.BUNDLE convert Java Objects to strings.
If possible!
15. BUNDLE.TYPE modified

The new version link:
https://github.com/RFO-BASIC/Basic/files/876323/OliBasicXVII.zip

Here is an example how to reseive system network broadcast messages
(In this case ACCESS_NETWORK_STATE permission is nedded)
and Bundle enhancements:

Code:
REM Start of BASIC! Program NetworkBroadcasts.bas


FN.DEF bprint(bundle, msg$)
PRINT msg$

BUNDLE.KEYS bundle, list
LIST.SIZE list, size
IF size = 0
  PRINT "Empty bundle"
  PRINT " "
  FN.RTN 0
ENDIF

FOR i = 1 TO size
  LIST.GET list, i, key$
  !  Print key$

  BUNDLE.TYPE bundle, key$, type$
    Print "type$ "; type$

  IF type$ = "N"
   BUNDLE.GET bundle, key$, value
   PRINT key$, value
  ELSE
   BUNDLE.GET bundle, key$, value$
   PRINT key$, value$
  ENDIF

NEXT i

PRINT " "
FN.RTN 1
FN.END
DEBUG.ON
Counter = 0

ARRAY.LOAD actions$[],"android.net.wifi.STATE_CHANGE",~
"android.net.wifi.WIFI_STATE_CHANGED",~
"android.net.conn.CONNECTIVITY_CHANGE",~
"android.net.conn.INET_CONDITION_ACTION"
BROADCAST.INIT actions$[]
DIALOG.MESSAGE "Stop and Restart your WiFi Connection", "GoOn?", selection, "OK"

DO
UNTIL 0

BROADCAST.CLOSE
END

ONBROADCAST:
PRINT "Received Broadcast! .: "
BROADCAST.IN retAction$, retData$, retBundleIndex
PRINT "retAction$ ",retAction$
PRINT "retData$ ",retData$
Counter ++
x = bprint(retBundleIndex, INT$(Counter))
DEBUG.DUMP.BUNDLE retBundleIndex
BROADCAST.RESUME


Example APK:

https://github.com/RFO-BASIC/Basic/files/876467/NetworkBroadcasts.zip

Happy coding
Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: Hot summer of code
Unread postPosted: Tue Mar 28, 2017 12:24 pm 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1317
Excellent work Gregor

Quote:
13. FILE.EXISTS accepts string expressions and values. See description.
Now are no changes in older programs and libs needed.

Alway good to be backward compatible ;)

Demo works well.

Regards Roy


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 86 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
suspicion-preferred