I'd like to point out that the five uses of 'Now' in the example all occur at
different
times - but very close together temporally.
A better test is to use only one 'Now' in the program into a variable and
format with the
different lines.
--
Open WebMail Project (http://openwebmail.org)
For TheCounter = 0 To 100
TheArray[TheCounter] = New Class1 <--- you need to create a new object at
each element
TheArray[TheCounter].I = TheCounter< Your error because no
object at
the element exists. You only created the array.
--
Open WebMail Project (http://openwe
My first guess would be that a socket server can't listen
on a port without an IP associated with it.
If your network connection is DHCP then the server can't listen.
It you have a hard IP, then it can.
--
Open WebMail Project (http://openwebmail.org)
-- Original Message ---
Fr
Gambas.ca is available
I am in Canada, I will donate purchase it for you on an on-going basis.
-Fernando (in Canada)
--
Open WebMail Project (http://openwebmail.org)
-- Original Message ---
From: Benoît Minisini via Gambas-user
To: gambas-user@lists.sourceforge.net
Cc: Benoît Mi
I think
Read #hfile, IDtag, ID3v1_TAG
should be
Read #hfile, IDtag as ID3v1_TAG
--
Open WebMail Project (http://openwebmail.org)
-- Original Message ---
From: Shane
To: gambas-user@lists.sourceforge.net
Sent: Tue, 18 Jul 2017 10:50:43 +1000
Subject: Re: [Gambas
Yes it is possible, I do it. here is some code (incomplete)
-Nando (Canada)
' top of class file
Public Struct recstruc
_a as integer
_b as integer
_c as integer
end struct
' a function
public function openAfile(filename as string) as file
dim hfile as file
dim arec as recstruc
hfile
Rounding depends on what rounding you want.
Most people think of 5/4 rounding.
I prefer to round manually 5/4... 5 up, 4 down.
Dim n as Float = 26.6601
n = n * 100. 'n = 2666.01 ' 2 decimal points rounding
n = n + 0.5 'n = 2666.51 ' 5/4 rounding*
n = CLong(n) 'n =
there are much faster ways...just a little more
intricate.
Nando
--
Open WebMail Project (http://openwebmail.org)
-- Original Message ---
From: Fernando Cabral
To: mailing list for gambas users
Sent: Sat, 1 Jul 2017 00:18:42 -0300
Subject: Re: [Gambas-user] I need a hint on h
Well, there is complicated, then there is simplicity:
I tested this. Works for sorted, unsorted.
Can't be any simpler.
Public Function RemoveMultiple(a As String[]) As String[]
Dim x as Integer
Dim z as NEW STRING[]
For x = 1 to a.count()
if z.Find(a) = 0 Then z.Add(a[x])
Next
'if you want it
Another very effective and simple would be:
You have your array with data
You create a new empty array.
Loop through each item in your array with data
If it's not in the new array, then add it.
Destroy the original array.
Keep the new one.
...something like (syntax may not be correct)
Public Fu
Sometimes GOTO is needed...especially if you want your code to run faster.
Used properly and judiciously, it can make code reading much easier.
--
Open WebMail Project (http://openwebmail.org)
-- Original Message ---
From: Cristiano Guadagnino
To: mailing list for gambas users
My reply to the comment:
> Gambas Strings are not null-terminated and can
> contain any sequence of bytes, which includes non-printable characters
> (which I think is what you meant by "unreadable" characters).
You should always consider String as an array of bytes.
Just because humans can't read
I have used Gambas serial port for 12 years now without problems.
If there is nothing in the serial port queue, then that line might block.
I use this:
. . .
L=Lof(Sport) 'how much is there now?
if L>1 then L=L-1'leave at least one byte for next time around.
i
One way is to make a function is Fmain which is public called (for example)
public Function Print_Sport(s as String) 'this is in Fmain
print #sport, s, len(s)
end function
Outside fmain, you can call Fmail.Print_Sport(Chr$(&H1B) & Chr$(&H61))
because it is visible
-Fernando
--
Open WebMail
I use structs to write binary to a file in struct order.
Nice and easy.
Not so easy with a class.
Your example is possible. I have done similar.
The STRUCT only defines the structure...it doesn't create the memory allocation.
Static Private WorldMap[100, 100] As MapObject just defines arrays to
I've done extensive work with the serial port for a dozen years
with 100% success 24 hour operation.
Sometimes people get mixed up with "0x02" thinking it's binary.
That is 4 characters ascii.
I prefer to use chr(2) to create a 1 length string binary 2.
If you're going to use byte[] array
then byt
16 matches
Mail list logo