SYSTEM4.2

Last-modified: 2008-01-01 (火) 07:07:31

変数

変数型名扱える値演算子型違いへの代入
int整数+ - * / =float,string(int用関数での変換)
float実数(小数)+ - * / =int,string(float用関数での変換)
string文字列+ =関数型オブジェクト,int(string用関数での変換)
bool0(false)/非0(true)+ - * / =int
array上記の4つと構造体名,functypeのいずれかひとつなしなし

関数

  • 関数
  • シナリオ関数?
  • メソッド?

int

 int変数の扱える値は、-2147483648~2147483647です。
 値は循環しているので、2147483647 + 1は-2147483648となり、 -2147483648 - 1は2147483647となります。

  • intオブジェクト関数?
    関数名機能戻り値引数
    String()int値を文字列に変換します。stringvoid

float

 float変数の扱える値は、1.175494351e-38~3.402823466e+38です。有効桁数は6桁です。

  • floatオブジェクト関数?
    関数名機能戻り値引数
    String()float値を文字列に変換します。stringint nDecimal

string

  • stringオブジェクト関数?
    関数名機能戻り値引数
    Int()string文字列を数値に変換します。intvoid
    Length()文字列の長さの取得。(2バイト=1文字)intvoid
    LengthByte()文字列の長さの取得。(2バイト=2文字)intvoid
    Empty()文字列が空か調べます。intvoid
    Find()文字列からszKeyがあるか調べます。intstring szKey
    GetPart()nIndexの位置からnLengthの長さの文字列を切り出します。stringint nIndex,int nLength
    PushBack()文字列の最後尾にnCharaの文字を追加します。voidint nChara
    PopBack()文字列の最後尾の文字を削除します。voidvoid
    Erase()指定位置の文字を1文字削除します。voidint nIndex

array

  • arrayオブジェクト関数?
    関数名機能戻り値引数
    Alloc()メモリを確保します。voidint n要素数,...
    Numof()要素数を返します。intint n次元数
    Free()メモリを解放します。voidvoid
    Empty()配列が空の場合1、空でない場合0を返しますintvoid
  • 一次元配列専用
    関数名機能戻り値引数
    Realloc()配列のサイズを変更します。voidint n要素数
    Copy()配列をコピーします。intint nIndex,ref array@? a,int nIndex,nX
    Fill()配列を要素で塗りつぶしますintint nIndex,int nX,value(要素)
    PushBack()配列の最後尾にvalueを追加しますvoidvalue(要素)
    PopBack()配列の最後尾を削除します。voidvoid
    Erase()指定されたIndexのオブジェクトを削除します。intint nIndex
    Insert()指定されたIndexにオブジェクトを挿入します。intint nIndex,value
    Sort()配列の要素をソートします。voidint 関数ポインタ

四則演算

  • 代入
    op1 = op2
    • 加算代入
      op1 += op2
    • 減算代入
      op1 -= op2
    • 乗算代入
      op1 *= op2
    • 除算代入
      op1 /= op2

型違い

剰余op1 % op2
出力変換op1 % op2
 
配列添字op1[op2]
Char抽出op1[op2]
 
関数呼び出しop1(op2)
キャストop1(op2)

条件式

if

  • 条件ループ
    while?
    for?
  • 等価
    op1 == op2
  • 非等
    op1 != op2
    • 小なり
      op1 < op2
    • 大なり
      op1 > op2
    • 以下
      op1 <= op2
    • 以上
      op1 >= op2
  • 積結合(and)
    op1 && op2
  • 和結合(or)
    op1 || op2
  • 条件
    op1 ? op2 : op3

備考

ハンガリアン記法