HSPポータル
サイトマップ お問い合わせ


HSPTV!掲示板


未解決 解決 停止 削除要請

2007
0501
harvestnoteget関数3解決


harvest

リンク

2007/5/1(Tue) 19:59:02|NO.7879

現在のnotegetは命令ですが、


test=A x="A\nB\nC" if test!noteget(x,0) : end

↑こんな感じで使えたら重宝しそう。
p1は変数、p2はインデックス(行単位)。



この記事に返信する


hamach2.0

リンク

2007/5/2(Wed) 02:02:48|NO.7893

hamach です。

たしかに、関数にして欲しい命令は多数ありますよね。
noteget もその1つでした。

私は exist() にしてほしいですね。


#define FILE_NAME "dum.txt" if exist(FILE_NAME) = -1{ dialog "FileNotFound" } else{ notesel buf noteload FILENAME



KIMU

リンク

2007/5/2(Wed) 02:34:48|NO.7896


#module #undef noteget #defcfunc noteget var buf,int idx,local temp notesel buf noteget@hsp temp,idx noteunsel return temp #undef exist #defcfunc exist str fn exist@hsp fn return strsize #global x="A\nB\nC" mes noteget(x,0) mes noteget(x,1) mes noteget(x,2) #define FILE_NAME "dum.txt" if exist(FILE_NAME) = -1{ dialog "FileNotFound" end } mes FILE_NAME

使い難いだけなら自分で関数を作っちゃえば良いと思う
(どっかに命令を関数に換えたのが色々有ったような・・・)



不如帰

リンク

2007/5/2(Wed) 17:09:38|NO.7915

そういえば、#undefとか使って命令及び関数の改造とか出来たよね。

こんなかんじに

#module module1 #undef mes #deffunc mes str msg,int r,int g,int b color r,g,b mes msg return #global
mesをちょっと改造。
2,3,4パラメータで色指定できます。

改造は他の機能とかにに障るよ



ONION software Copyright 1997-2023(c) All rights reserved.