[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] R: how to generation 12 random letters (A-Z and 0-9)
From:       Jussi Lahtinen <jussi.lahtinen () gmail ! com>
Date:       2015-05-30 14:41:43
Message-ID: CAFJMe7R+Q9wwaz-XfnVz7hyTqP7Af=bppB=58BOVUz6cWScXYw () mail ! gmail ! com
[Download RAW message or body]

You can write that in nicer way with rand() function, than rnd() function.
But that doesn't really matter, your code works anyway.


Jussi

On Sat, May 30, 2015 at 3:12 PM, Ru Vuott <vuott@yahoo.it> wrote:

> Hello,
>
> I propose:
>
>
> Public Sub Button1_Click()
>
>   Dim j As Byte
>   Dim s As String
>
>   For j = 1 To 12
>     If Fix(Rnd(0, 2)) Then
>       s &= Chr(Rnd(48, 58))
>     Else
>       s &= Chr(Rnd(65, 91))
>     Endif
>   Next
>
>   Print s
>
> End
>
>
> --------------------------------------------
> Sab 30/5/15, tsukuba GIMP user <tsukubagraduates@foxmail.com> ha scritto:
>
>  Oggetto: [Gambas-user] how to generation 12 random letters (A-Z and 0-9)
>  A: "gambas-user" <gambas-user@lists.sourceforge.net>
>  Data: Sabato 30 maggio 2015, 11:16
>
>  i want when i click button (button_1)
>  LCDpanl(LCDLabel1) will be Generation 12 random letters
>  how to do?
>
>  ------------------------------------------------------------------------------
>  _______________________________________________
>  Gambas-user mailing list
>  Gambas-user@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic