VB to Xojo

Trying to transfer a VB program to xojo, what are the alternatives for ln, Fix and int? Thank you.

Look here Migrating from Visual Basic

How do i use the library(VB-master)?

This request (on yahoo):
site:www.microsoft.com VB-master

returns nothing.

https://github.com/xojo/VB

It is mentioned in the readme.md

Download the Zip-file from GitHub and unzip it.
Open XojoVB.xojo_project in Xojo and copy the VB module (with globe icon) in your own project.

And what will this change? I did it and it still can’t realize what int and fix means

Window1.PushButton1.Action, line 10
This item does not exist
j = Fix(f)

  • did you declare f and j within the scope of the action method? One thing that was easy to do with VB was to declare global variables. Xojo is a bit more strict. A good habit is to declare variables only where you are going to use them.
  • did you assign a numeric value to f?

If you did, then try with .fix where the module name is the name of the module containing the FIX function.

From the Xojo.VB ReadMe:

So use it like this:

Dim f As Double = -8.4 Dim j As Integer = VB.Fix(f)

Oh, it worked, thanks a lot! But what should i do with Log10, CInt(to integer) and CSng(to single)?

Log10, CInt(to integer) and CSng(to single)?

Log10 of N =

log(n) / log(10)

CInt (N) =

Floor(n)     as long as the number is positive

Csng (n) =

dim s as single s = n return s

it started working with a little bit different numbers in results then in VB(0,168 in VB, 0,169 in Xojo), but thats fine. Huge thanks! Hope ill get used to Xojo soon.

You won’t regret your move.