Sponsored Content
Full Discussion: Feof
Top Forums Programming Feof Post 11414 by shaik786 on Wednesday 5th of December 2001 12:22:03 AM
Old 12-05-2001
Hi!

Replace your code with:

#include [stdio.h]
FILE *invfile;
int prod, qty;
float price;

void main()
{
invfile = fopen("file.dat","r");
while(fscanf(invfile,"%d %d %f", &prod, &qty, &price) != EOF)
{
printf("Product No. = %d\n",prod);
printf("Quantity = %d\n",qty);
printf("Price = %.2f\n\n",price);
}
fclose(invfile);
}

Rgds
SHAIK
shaik786
 
Finance::Quote::Trustnet(3)				User Contributed Perl Documentation			       Finance::Quote::Trustnet(3)

NAME
Finance::Quote::Trustnet - Obtain unit trust prices from trustnet.co.uk SYNOPSIS
use Finance::Quote; $q = Finance::Quote->new; %stockinfo = $q->fetch("uk_unit_trusts","trust-name"); # Can failover to other methods %stockinfo = $q->fetch("trustnet","trust-name"); # Use this module only. DESCRIPTION
This module obtains information about UK unit trust prices from www.trustnet.co.uk. The information source "uk_unit_trusts" can be used if the source of prices is irrelevant, and "trustnet" if you specifically want to use trustnet.co.uk. UNIT TRUST NAMES
Unfortunately there is no unique identifier for unit trust names. Therefore enough of the name should be given including spaces to yield a unique match. Trustnet sometimes uses abbreviated names, and the string given should match the abbreviation. Consult http://www.trustnet.co.uk/ut/funds/perf.asp?sort=0 to find a match for your unit trusts. Example "jupiter income" LABELS RETURNED
Information available from Trustnet may include the following labels: exchange method source name currency bid ask yield price. In case of a unit trust, "price" returns the offer (ask) price. In case of an OIEC, the unique price is returned in "bid", "ask" and "price". SEE ALSO
Trustnet website - http://www.trustnet.co.uk/ Finance::Quote::Yahoo::USA perl v5.12.1 2009-10-05 Finance::Quote::Trustnet(3)
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy