A few questions from conversion Basic4PPc to Basic4Android

HARRY

Active Member
Licensed User
Longtime User
Hi,

I am converting (more or less rewriting ) a Basic4PPC program to Basic4android.
a few questions:

1) How to close a file opened with File.OpenInput?

2) Does an equivalent for AppPath or CurDir exist?

3) How to get the integer part of a float?

4) I get an error at Compiling generated Java code. :
Plots(i).PlotTime=0
javac 1.6.0_26

on

Process globals:

Type Plot(Latitude As Double,Longitude As Double,Height As Int,PlotTime As Long)
Dim Plots(10) As Plot

Sub Activity_Create(FirstTime As Boolean)

For i = 0 To 8
Plots(i).Latitude=0
Plots(i).Longitude=0
Plots(i).Height=0
Plots(i).PlotTime=0
Next i

5) WEBView : does the program wait untill the document is shown? I cannot find a 'DocumnetCompleted'or similar event.

6) Concatination of a string with & i+1 did work on Basic4PPC, with Basic4Android I get an error on the + sign

:sign0013: wrong forum.
Harry
 
Last edited:

klaus

Expert
Licensed User
Longtime User
1) You will probably need a TextReader object.
TextReader1.Initialize(File.OpenInput(File.DirInternal, "Filename"))
str = TextReader1.ReadLine
.
TextReader1.Close

2) AppPath > File.DirInternal

3) Int(number) > Floor(number)

4) Next i > Next, no variable after Next !

5) I think it is the WebView1.PageFinished event

6) = txt & (i + 1)

Best regards.
 
Upvote 0
Top