DelphiÖÐʵÏÖÈ«½Çת°ë½Ç
DelphiÖÐʵÏÖÈ«½Çת°ë½Ç
function SbctoDbc(s:string):string;
var
nlength,i:integer;
str,ctmp,c1,c2:string;
{
ÔÚwindowsÖУ¬ÖÐÎĺÍÈ«½Ç×Ö·û¶¼Õ¼Á½¸ö×Ö½Ú£¬
²¢ÇÒʹÓÃÁËascii¡¡chart 2
(codes 128 - 255
)¡£
È«½Ç×Ö·ûµÄµÚÒ»¸ö×Ö½Ú×ÜÊDZ»ÖÃΪ163£¬
¶øµÚ¶þ¸ö×Ö½ÚÔòÊÇÏàͬ°ë½Ç×Ö·ûÂë¼ÓÉÏ128£¨²»°üÀ¨¿Õ¸ñ£©¡£
Èç°ë½ÇaΪ65£¬ÔòÈ«½ÇaÔòÊÇ163£¨µÚÒ»¸ö×Ö½Ú£©¡¢
193 £¨µÚ¶þ¸ö×Ö½Ú£¬ 128 + 65 £©¡£
¶ø¶ÔÓÚÖÐÎÄÀ´½²£¬ËüµÄµÚÒ»¸ö×Ö½Ú±»ÖÃΪ´óÓÚ163£¬£¨
Èç ' °¢ ' Ϊ:
176 162 £©,ÎÒÃÇ¿ÉÒÔÔÚ¼ì²âµ½ÖÐÎÄʱ²»½øÐÐת»»¡£
}
begin
nlength: =
length(s);
if (nlength = 0 ) then
exit;
str: = '' ;
setlength(ctmp,nlength + 1 );
ctmp: = s;
i: = 1 ;
while (i # 163 ) then //
Èç¹ûÊǺº×Ö
begin
str:
= str + c1;
str: = str +
c2;
inc(i, 2
);
continue ;
end;
if (c1 = # 161 ) and (c2 = # 161 )
then // Èç¹ûÊÇÈ«½Ç¿Õ¸ñ
begin
str: = str + ' '
;
inc(i, 2
);
continue ;
end;
str: = str + c1;
inc(i);
end;
result: = str;
end; ---
±¾ÎÄÕÂʹÓá°¹ú»ªÈí¼þ¡±³öÆ·µÄ²©¿ÍÄÚÈÝÀëÏß¹ÜÀíÈí¼þMultiBlogWriter׫д²¢·¢²¼
Ïà¹ØÎĵµ£º
DELPHIÓõò»Ì«¶à£¬¼ÓÉÏÄԽºÃʹ£¬¾Í¼ÇÒ»ÏÂ×î³£ÓöԿª·¢Ð§ÂʺÜÓаïÖúµÄ¼¸¸ö£º
Ctrl+Êó±ê×ó¼ü£º²éÕÒ¶¨Òå
Ctrl+Shift+↑£ºÉÏÒ»²Ù×÷ÓëÆäÕýºÃÏà·´£¬Óɶ¨Òå²éÕÒʵÏÖ
Ctrl+Shift+¿Õ¸ñ£ºÔÚÒ»¸öº¯ÊýûÓÐÊäÈë²ÎÊýµÄÀ¨ºÅÄÚ°´Ï´˿ì½Ý¼üʱ»á³öÏÖº¯ÊýÏà¹Ø²ÎÊýµÄÌáʾÐÅÏ¢£¬°üÀ¨ÖØÔصÄËùÓк¯ÊýµÄÐÅÏ¢ ......
¾ßÌåÒªÇó£º
1¡¢¼ÆËã»ú¼°Ïà¹Ø×¨Òµ×¨¿ÆÒÔÉÏѧÀú£¬ÓÐ2ÄêÒÔÉϵŤ×÷¾Ñ飻
2¡¢¾«Í¨Delphi²¢ÓÐÔËÓÃDelphi³É¹¦¿ª·¢ÏîÄ¿µÄ¾Ñ飻
3¡¢ÊìÏ¤ÍøÂ翪·¢£¬Óпؼþ¿ª·¢¾ÑéÕßÓÅÏÈ¿¼ÂÇ£»
4¡¢ÊìϤÈí¼þ¹¤³Ì£¬¾ßÓÐÁ¼ºÃµÄ¿ª·¢Ï°¹ß£¬ÄÜÕýȷʹÓð汾¿ØÖƹ¤¾ß£»
5¡¢¾ßÓкÜÇ¿µÄÍŶӺÏ×÷ºÍ³Ô¿àÄÍÀ͵ľ«Éñ£¬¾ßÓÐһ˿²»¹¶µÄ¹¤×÷×÷·çºÍÈÏÕæ¸ºÔðµÄ ......
żȻÀ´ÕÒÒ»¸öÎļþ£¬È´·¢ÏÖÕâÀï¹ØÓÚvc++ºÍDelphiµÄÌÖÂÛºÜÊǼ¤ÁÒ¡£¿´ÁË´ó¼ÒдµÄһЩ
ÎÄÕ£¬¾õµÃÓÐЩ¿´·¨ÕýÈ·£¬ÓÐЩ¾ÍºÜÆ«ÆÄÉõÖÁ´íÎó(Ò²ÐíÎÞÖª£¿ºÜ±§Ç¸ÎÒÕâÑù˵:-)¡£ÎÒ
ÎÞÒâÓëÈκÎÈËÕùÂÛ£¬¸üÔ¸Òâ°ÑÕâ¿´³ÉÊǼ¼ÊõÉϵÄÌÖÂÛ¡£Ó¦¸Ã±¾×Ź«Õý£¬²»´øÆ«¼ûµÄ̬¶È
(Õâ²¢²»Òâζ×Å·ÇҪƽ·ÖÇïÉ«£¬Ò»ÇÐÓ¦ÒÔÊÂʵΪ׼)¡£ÎÒÓùý³ýtp1ÒÔÍâµÄËùÓ ......
Chr ½«Ò»¸öÓÐÐòÊý¾Ýת»»ÎªÒ»¸öANSI×Ö·û
Ord ½«Ò»¸öÓÐÐòÀàÐÍֵת»»ÎªËüµÄÐòºÅ
Round ת»»Ò»¸öʵÐÍֵΪËÄÉáÎåÈëºóµÄÕûÐÍÖµ
Trunc ת»»Ò»¸öʵÐÍֵΪСÊý½Ø¶ÏºóµÄÕûÐÍÖµ
Int ·µ»Ø¸¡µãÊýµÄÕûÊý²¿·Ö
IntToStr ½«Êýֵת»»Îª×Ö· ......
£®pas ---- pascalµÄËõд, µ¥ÔªÔʼ³Ìʽµµ£¨ unit source files £©
£®dpr ---- ר°¸µµ ( project files )
£®dpk ---- °ü¹üÔʼ³Ìʽµµ/×é¼þ°ü ( package source files )
£®dfm ---- ±íµ¥µµ (¼Ç¼formµÄÄÚÈÝ,³ýÈ¥Õâ¸öÄÚÈݾ͵ÈÓÚɾ³ýÁËformÕâ¸ö±íµ¥)
£®dcu ---- ÊDZàÒëºÃµÄµ¥ÔªÎļþ.ÈôÖ»ÓÐÒ»¸ödcuÎļþ,Ôò²»ÄÜ¿´µ½Ô´´úÂë.
......