Browse Subversion Repository
Contents of /trunk/doc/en/html/macro/command/checksum8.html
Parent Directory
| Revision Log
Revision 8939 -
( show annotations)
( download)
( as text)
Thu Oct 1 16:06:58 2020 UTC
(3 years, 7 months ago)
by nmaya
File MIME type: text/html
File size: 1369 byte(s)
マクロコマンドが Tera Term バージョンいくつから存在するか、それぞれのマクロコマンドのヘルプページに記載
ticket #40808
MFT to: 4-stable
| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| 6 |
<title>checksum8, checksum8file</title> |
| 7 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
| 8 |
<link rel="stylesheet" href="../../style.css" type="text/css"> |
| 9 |
</head> |
| 10 |
|
| 11 |
<body> |
| 12 |
|
| 13 |
|
| 14 |
<h1>checksum8, checksum8file</h1> |
| 15 |
|
| 16 |
<p> |
| 17 |
Calculates the 8bit-checksum of a string or a file. <em>(version 4.78 or later)</em> |
| 18 |
</p> |
| 19 |
|
| 20 |
<pre class="macro-syntax"> |
| 21 |
checksum8 <intvar> <string> |
| 22 |
checksum8file <intvar> <filename> |
| 23 |
</pre> |
| 24 |
|
| 25 |
<h2>Remarks</h2> |
| 26 |
|
| 27 |
<p> |
| 28 |
This macro function calculates the checksum(8bit) of a string or a file. |
| 29 |
<br><br> |
| 30 |
|
| 31 |
The calculated value stores the variable "intvar" as mathematical value.<br> |
| 32 |
If the <filename> file can not open by using checksum8file, the system variable "result" is set to -1. |
| 33 |
</p> |
| 34 |
|
| 35 |
<h2>Example</h2> |
| 36 |
|
| 37 |
<pre class="macro-example"> |
| 38 |
str = 'this is a test string to be checksum8ed' |
| 39 |
checksum8 crc str |
| 40 |
|
| 41 |
; Display checksum8 result asHEX |
| 42 |
sprintf '0x%08X' crc |
| 43 |
messagebox inputstr 'checksum8 = ' |
| 44 |
|
| 45 |
checksum8file crc 'foo.bin' |
| 46 |
if result = -1 then |
| 47 |
messagebox 'file open error' 'checksum8 = ' |
| 48 |
else |
| 49 |
sprintf '0x%08X' crc |
| 50 |
messagebox inputstr 'checksum8 = ' |
| 51 |
endif |
| 52 |
</pre> |
| 53 |
|
| 54 |
</body> |
| 55 |
</html> |
|