當前位置:編程學習大全網 - 編程軟體 - delphi編程語言,數組問題,

delphi編程語言,數組問題,

1: m_sSeparater:= VarToStr(avtemp[0])[1]//請問這裏[1]是什麽意思呢.?

比如現在avtemp[0]這個Variant的值是字符串'ABC' 那麽 VarToStr(avtemp[0])[1] 就等於'B'。[1]取下標第二個。

2這段代碼的意思:

begin

inherited; //繼承

try

//創建 IboCOASegment 實例

oboCOASegments := CreateEverestObject(CLASS_boCOASegment) as IboCOASegment;

//傳入GUID值,使用GetSegmentInfo方法獲得壹個varaint型的字符串數組

avtemp:=oboCOASegments.GetSegmentInfo(GetUID);

//如果avtemp數組第壹個下標不為空

if VarToStr(avtemp[0])<>EmptyStr then

//取avtemp[0]這個字符串第二個字符

m_sSeparater:= VarToStr(avtemp[0])[1]//請問這裏[1]是什麽意思呢.?

else

//否則m_sSeparater為空字符

m_sSeparater:=#0;

//cmbCode的掩碼為GetCoaSegmentFormat

cmbCode.Properties.editMask:=GetCoaSegmentFormat

except

end

end;

給分吧。

  • 上一篇:計算機輔助翻譯課程學什麽
  • 下一篇:表揚女兒很棒的句子
  • copyright 2024編程學習大全網