DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦b05a72f7f⟧ TextFile

    Length: 768 (0x300)
    Types: TextFile
    Names: »FLOATSUM.C«

Derivation

└─⟦23f778bf6⟧ Bits:30005378 BDS C v1.46 & Pascal/MT+ v5.5 (Callan format)
    └─ ⟦this⟧ »FLOATSUM.C« 
└─⟦4ada80662⟧ Bits:30005446 Pascal/MT+ v5.5 & XREF & BDS C v1.46
    └─ ⟦this⟧ »FLOATSUM.C« 

TextFile


/* 
	This program is a simple example of how to use
	Bob Mathias's floating point package.
	After compiling this and the FLOAT.C library, link by saying:

	A>clink floatsum -f float <cr>

	Note: the "printf" function resulting from this linkage
	will support the "e" and "f" floating point conversion
	characters, but the regular "printf" would not. The reason:
	the special version of "_spr" in the FLOAT.C source file
	is loaded before the library version of "_spr", and
	thus supports the extra features.
*/

main()
æ
	char s1Æ5Å, s2Æ5Å;
	char stringÆ30Å;
	char sbÆ30Å;
	int i;
	atof(s1,"0");
	while (1) æ
		printf("sum = %10.6fØn",s1);
		printf("ØnEnter a floating number: ");
		fpadd(s1,s1,atof(s2,gets(string)));
	å
å

«eof»