alguien sabe como se genera un numero de serie

Post Reply
Gerardo Farfan
Posts: 52
Joined: Fri Oct 28, 2005 3:42 pm
Location: Mexico, D.F.

alguien sabe como se genera un numero de serie

Post by Gerardo Farfan »

y cuales son sus caracteristicas.

de antemano muchas gracias
User avatar
Antonio Linares
Site Admin
Posts: 42450
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 20 times
Been thanked: 58 times
Contact:

Post by Antonio Linares »

Gerardo,

Puedes usar la función nRandom( <nRango> ) --> nValue de FW, y luego pasar el valor a hexadecimal con DecToHex( nValue ). Si quieres luego le intercalas algún "-" y tendrás un número de serie bastante aceptable.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
leandro
Posts: 1728
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Has thanked: 24 times
Been thanked: 4 times
Contact:

lo necesito

Post by leandro »

Antonio como estas. de casualidad no tienes un ejemplo un poco mas didactico sobre como generar el numero de serie.

De antemano gracias
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 24.09 ] [ xHarbour 64 bits) ]
Gerardo Farfan
Posts: 52
Joined: Fri Oct 28, 2005 3:42 pm
Location: Mexico, D.F.

Post by Gerardo Farfan »

gracias antonio
User avatar
Antonio Linares
Site Admin
Posts: 42450
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 20 times
Been thanked: 58 times
Contact:

Post by Antonio Linares »

Leandro,

Code: Select all | Expand

function Main()

   local nValor1 := nRandom( 1000000 )
   local nValor2 := nRandom( 1000000 )
   local cSerie  := DecToHex( nValor1 ) + "-" + DecToHex( nValor2 )
   
   MsgInfo( cSerie )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
leandro
Posts: 1728
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Has thanked: 24 times
Been thanked: 4 times
Contact:

GRACIAS

Post by leandro »

Antonio muchas gracias
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 24.09 ] [ xHarbour 64 bits) ]
Post Reply