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

the_right

Syntaxe

TheRight(x,y)
Décalage à droite. Les bits du premier opérande (x) sont décalés vers la droite du nombre de fois indiqué par le second opérande (y). Les bits qui sortent à droite sont perdus. Les positions libérées à gauche sont remplacées par des des 0. Les paramètres sont des nombres binaires au format nombre. Le resultat est au format texte. x est un nombre binaire, y est un entier inférieur au nombre de bits de x.

Exemple

TheRight(10111, 2)
---> "00101"

Script

on TheRight(x, y)
return (characters 2 thru (the length of (((10 ^ y) as integer) as string)) of (((10 ^ y) as integer) as string) as string) ¬
& (characters 1 thru ((the length of (x as string)) - y) of (x as string) as string)
end TheRight

Remarque

Analogue au " x >>> y " en JavaScript. Voir the_left .

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