FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Hex converter for WD
Hex converter for WD
Débuté par Gill, 23 juin 2003 09:19 - 2 réponses
Connectez-vous…
Gill
#1
Posté le 23 juin 2003 - 09:19
Hi
Does anyone have a hex converter / hex-dec/dec-hex procedure that can accept input param and give text result?
Please
Gill
Signaler
0
0
Clive Dickinson
#2
Posté le 23 juin 2003 - 15:47
Hi
Does anyone have a hex converter / hex-dec/dec-hex procedure that can accept input param and give text result?
Please
Gill
Gill,
I have not written one with WD but the algorithm is easy. From dec to hex you just repeatedly divide by 16 and take the remainder each time (using a mask to convert to single character 0 to F) until the quotient is less than 16. The last quotient is the high order place holder and the remainders go from last to first - high order to low order)
>From hex to dec you reverse this. Split off each character, translate via the mask and then multiply by 16 and add to number.
hth
Clive
Signaler
0
0
Romuald Besset
#3
Posté le 23 juin 2003 - 18:13
Hi Gill
Our french FAQ resolved this somes monthes ago...
u can copy french code and use wd code translator.
The aim is use auto vars types resolution from a char to a small interger easy to convert into hexadecimal.
Read there the code :
http://rbesset.net/modules/xoopsfaq/index.php…
Sorry for the french but i cannot have a full content translated website.
regards
Romuald Besset
Hi
Does anyone have a hex converter / hex-dec/dec-hex procedure that can accept input param and give text result?
Please
Gill
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte