BITMAPINFOHEADERをMSDNで引けば書いてあるが。 >The relative intensities of red, green, and blue are represented >with five bits for each color component. The value for blue is in the >least significant five bits, followed by five bits each for green and red
int main(){ double f; int i; for(i=0;i<11;i++){ f=1.0+0.1*i; printf("%f ",f); printf("%f\n",round(f)); } } --------------------- っていうプログラムを実行すると、 1.000000 1.000000 1.100000 1.099999 1.200000 1.200000 1.300000 1.299999 1.400000 1.400000 1.500000 1.500000 1.600000 1.599999 nan nan nan nan nan nan nan nan と、途中で崩れてしまいます。 とても気持悪いのですが、どこがいけないのでしょうか?
コンパイルを、以下のように実行しています。(改行多すぎるので、空白行詰めてます) C:\bascom\lib>bas abc C:\bascom\lib>bascom /x /o abc; IBM BASIC Compiler/2 Version 1.07 (C) Copyright IBM Corp. 1982-1990. (C) Copyright Microsoft Corp. 1982-1988. All rights reserved. 37175 Bytes Available 25794 Bytes Free 0 Warning Error(s) 0 Severe Error(s) C:\bascom\lib>link abc; IBM Linker/2 Version 1.00 Copyright (C) IBM Corporation 1987 Copyright (C) Microsoft Corp 1983-1987. All rights reserved.