delphi 字符串转二进制怎么转( 超经典).txt 第一次笑是因为遇见你,第一次哭是因为你不在, 第一次笑着流泪是因为不能拥有你。 unit Convert; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; const //////////////////////////////////////////////////////////////////////////////// // DIGITS 数字// Characters that represent each digit. Add more characters to convert numbers // 字符代表的一个数字,添加更多的字符对应转换的数字// with higher bases. // 通过更高的位 Digits : string = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; //////////////////////////////////////////////////////////////////////////////// // COMMON BASES 进制// Common values for base representations. cbBin = 2; // Binary base cbOct = 8; // Octal base cbDec = 10; // Decimal base cbHex = 16; // Hexadecimal base type //////////////////////////////////////////////////////////////////////////////// // TCONVERT 转换// Converts a number, in string representation, from a base into many others. // 转换一个数字,用字符串中相应的字符表示// // Start 开始// Place a TConvert in the form. Assign Base property the original base of // // the number to convert, and assign Text the number to convert. Modify Base // to change the number's representation; mon Bases constants or set // your own base. // // Properties // Base - Defines current base representation. // Text - Stores the number in string format. { 开始在 form 中放入 TConvert 。指定相应的属性,号码要转换的进制, 并指定文本的数字转换。修改相应改变数字的代表性; 使用整数来设定自己的进制。属性进制- 定义当前进制,如八进制: cbOc