?? sim_canshu.~pas
字號:
unit sim_canshu;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls;
type
sim_at=record
simat_num:integer ;
simat_str:string ;
end;
//AT+CMGL命令參數(shù)
//TYPE at_cmgl
//特殊鍵
const cnhuiche=chr(13); //回車
const cnhuanhang=chr(10) ; //換行
const cnctrl_z=chr(26) ; //ctrl+z
//10進制轉16進制用
const cScaleChar = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//隱藏窗口的參數(shù)
const MY_MESSAGE = WM_USER + 200;
//wavecom命令集
//////// A/ //重復上次的操作
const at_cmgf = 1 ; //設置短消息支持的格式(TEXT或PDU)
const at_WLPR = 2 ; //設置所支持的語言
const at_CGMI = 3 ; //獲得廠家的標識
const at_CGMM = 4 ; //查詢支持頻段
const at_CGMR = 5 ; //查詢軟件版本
const at_CGSN = 6 ; //查詢生產序列號
const at_CSCS = 7 ; //選擇支持網絡
const at_CIMI = 8 ; //查詢國際移動電話支持認證
const at_CCID = 9 ; //查詢SIM卡序列號
const at_GCAP =10 ; //查詢可使用的功能列表
const at_CMGI =11 ; //選擇當有新消息來時系統(tǒng)的提示方式
const at_CMGR =12 ; //讀取短消息
const at_CMGL =13 ; //將存儲的短消息列表
const at_CMGS =14 ; //發(fā)送短消息
const at_CMGW =15 ; //寫短消息并保存在存儲器中
const at_CMSS =16 ; //發(fā)送保存在存儲器中的短消息
const at_CSMP =17 ; //設置在TEXT模式下的參數(shù)
const at_CMGD =18 ; //刪除短消息
const at_CSCA =19 ; //提供短消息服務中心號碼
const at_WMSC =20 ; //修改短消息位置
const at_WMGO =21 ; //寫一條短消息放在第一個空位
function jianban(num:integer):integer ;
function str_Gb2UniCode( text: string ): String;
function IntToDigit(mNumber: Integer; mScale: Byte;mLength: Integer = 0): string;
{ 返回整數(shù)的進制表示;mScale指定多少進制;mLength指定長度,長度不足時向前補0 }
type
tsim_xinxi=array[1..5,1..10] of string;
var
sim_xinxi:tsim_xinxi ;
procedure init_sim_xinxi();
implementation
function jianban(num:integer):integer ;
var
i,j,k:integer ;
begin
j:=0;
k:=0;
for i:=1 to num do
begin
j:=j+1 ;
if j=2 then
begin
k:=k+1 ;
j:=0;
end;
end;
jianban:=k;
end;
function str_Gb2UniCode( text: string ): String;
var
i,j,len:Integer;
cur:Integer;
t:String;
ws:WideString;
begin
Result:='';
ws := text;
len := Length(ws);
i := 1;
j := 0;
while i <= len do
begin
cur := ord(ws[i]);
FmtStr(t,'%4.4X',[cur]); //BCD轉換
Result := Result+t;
inc(i);
//移位計數(shù)達到7位的特別處理
j := (j+1) mod 7;
end;
end;
function IntToDigit(mNumber: Integer; mScale: Byte;
mLength: Integer = 0): string;
{ 返回整數(shù)的進制表示;mScale指定多少進制;mLength指定長度,長度不足時向前補0 }
var
I, J: Integer;
begin
Result := '';
I := mNumber;
while (I >= mScale) and (mScale > 1) do begin
J := I mod mScale;
I := I div mScale;
Result := cScaleChar[J + 1] + Result;
end;
Result := cScaleChar[I + 1] + Result;
for I := 1 to mLength - Length(Result) do Result := '0' + Result;
end; { IntToDigit }
procedure init_sim_xinxi();
var
i,j:integer;
begin
for i:=1 to 5 do
begin
for j:=1 to 10 do
begin
sim_xinxi(i,j):='';
end;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -