getSingle関数の使い方?
Posted: 2008年7月11日(金) 18:09
下記のようなことをしてみたのですが、getSingle関数の戻り値が変(0)です。
使い方を間違っているのでしょうか?
Doubleの方は、期待値どおりなんですが。
使っているのは、4.24.00です。
#prompt
dim tmp as single
dim temp as double
dim buf[7] as byte
buf[3]=&hc3:buf[2]=&h28:buf[1]=&hb9:buf[0]=&h6b
buf[7]=&hc3:buf[6]=&h28:buf[5]=&hb9:buf[4]=&h6b
print getSingle(buf)
memcpy(VarPtr(tmp),buf,4)
print tmp
print getDouble(buf)
memcpy(VarPtr(temp),buf,8)
print temp
使い方を間違っているのでしょうか?
Doubleの方は、期待値どおりなんですが。
使っているのは、4.24.00です。
#prompt
dim tmp as single
dim temp as double
dim buf[7] as byte
buf[3]=&hc3:buf[2]=&h28:buf[1]=&hb9:buf[0]=&h6b
buf[7]=&hc3:buf[6]=&h28:buf[5]=&hb9:buf[4]=&h6b
print getSingle(buf)
memcpy(VarPtr(tmp),buf,4)
print tmp
print getDouble(buf)
memcpy(VarPtr(temp),buf,8)
print temp