51 routines :

*AppleScriptsVanilla*
ascii_to_HTML
Average
Calculator
Calendar
Count_item
cut_text
days_week
EAN13
Encrypt-Decrypt
FactPremier
French_Vanilla_Dotted_Date
French_Vanilla_Dotted_Date2
Hexa_to_Bin
Last_month
list_erase
list_insert
list_replace
ListeDiviseurs
ListePremiers
Minuscule
NombreLong
NombreLong2
NomExtension
num_item
num_month
num_month2
num_week
number_format
number_format2
Paques
PGCD
PGCD2
reverse_string
Roman_to_Arab
round_decimal
search_email
search_replace
search_URL
SepNbre
SepNbre2
snip_text
stat
TauxPermut
TauxTransform
the_left
the_right
TriBulle
TriLineaire
week_and_year
XOR
ZeroDouble

Hexa_to_Bin

Syntaxe

Hexa_to_Bin(hexa)
Convertit un nombre héxadécimal en nombre binaire. Le paramètre et le résultat sont au format texte.

Exemple

Hexa_to_Bin("CAFE")
--> "1100101011111110"

Script

on Hexa_to_Bin(hexa)
set bin_List to {"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"}
set hexa_List to "0123456789ABCDEF"
set bin to ""
repeat with i in hexa
set bin to bin & item (offset of i in hexa_List) of bin_List
end repeat
return bin
end Hexa_to_Bin

Remarque

Par convention, les chiffres hexadécimaux {A,B,C,D,E,F} sont des majuscules; la casse doit être respectée car le script traite ces "chiffres" comme des caractères.

Site scripté avec HyperCard ©1987-1998 Apple Computer, Inc.
Mise à jour le 19/01/10 à 08:45:57