HSP3 プログラミングの基礎U
前へ 目次へ 

◎ 推奨されない変数使用

サンプル

        goto *start
;-----ユーザ定義部(モジュール化)----------
#module mm
#deffunc testsub int para
        ans = para * bai@    ;モジュール外の変数baiを参照
        mes "2倍は、" + ans + "です。"
        xxx = 123
        return
#global
;-----メイン部----------
*start
        input indata
        button "判定", *han
        bai = 2
        stop
*han
        testsub indata
        mes xxx@mm    ;モジュールmm内の変数xxxを参照
        stop

 

前へ 目次へ 
2006  © Hiroshi Masuda 

 

 

inserted by FC2 system