Реализации алгоритмов/Алгоритм Верхуффа: различия между версиями
Содержимое удалено Содержимое добавлено
РоманСузи (обсуждение | вклад) преамбула и немного перевода |
DannyS712 (обсуждение | вклад) м <source> -> <syntaxhighlight> (phab:T237267) |
||
Строка 6:
== C ==
<
// Таблица умножения
static int verhoeff_d[][] = {
Строка 65:
}
</syntaxhighlight>
== C# ==
<
/// <summary>
Строка 173:
</syntaxhighlight>
== VB.NET ==
<
''' <summary>
Строка 286:
</syntaxhighlight>
== VB for Applications ==
<
''' <summary>
''' For more information cf. http://en.wikipedia.org/wiki/Verhoeff_algorithm
Строка 416:
Debug.Print "End Verhoeff's Asserts"
End Sub
</syntaxhighlight>
== Java ==
<
/**
Строка 537:
</syntaxhighlight>
== Python ==
<
# @see <a href="http://en.wikipedia.org/wiki/Verhoeff_algorithm">More Info</a>
Строка 610:
</syntaxhighlight>
==[[wikipedia:D_(programming_language)|D]]==
<
// tested with D version 2
Строка 676:
}
return a;
}</
== PHP ==
<
{{<?php
# @author Semyon Velichko
Строка 764:
assert("Verhoeff::validate('122451') === false");
assert("Verhoeff::validate('128451') === false");
</syntaxhighlight>
== AS3 ==
Строка 876:
== Pascal/Delphi ==
<
// <summary>
Строка 979:
end;
</syntaxhighlight>
==plsql ==
<
DECLARE
/**
Строка 1104:
END;
</syntaxhighlight>
== Common Lisp ==
<
(defparameter verhoeff-d
`(
Строка 1186:
)
(error "Verhoeff checksum testing failure"))
</syntaxhighlight>
== JavaScript ==
<
/*
For more info on the algorithm: http://en.wikipedia.org/wiki/Verhoeff_algorithm
Строка 1265:
return (c === 0);
}
</syntaxhighlight>
{{BookCat}}
|