C question about scanf
Bassoukos Tassos
abas at aix.meng.auth.gr
Wed Sep 15 12:04:10 EEST 1999
On Wed, 15 Sep 1999, Giorgos Keramidas wrote:
> Xrnsimopoieis tis fgets(), strtok() kai strtol() kai ftuveis auto to aisxro
> pragma pou legetai scanf().
Xrhsimopoieis perl, kai oute pou koitas thn C.
> % Px. exoume char line[80]; opou exei to periexomeno:
> % 0 123 3441234 532525 4634636 575745 (pithana kai kana \n sto telos)
> % kai exoume to long lt[6];
>
> Xwris va to exw kavei compile, mia prwtn idea eivai:
[snip]
#!/usr/local/bin/perl -w
$line=<>;
chomp $line;
@tokens=split $line;
foreack $i (0..$#tokens){
print "$i $tokens[$i]\n";
}
... kai meta fysika yparxei kai to Math::BigInteger ...
Tassos
--
Bassoukos Tassos +30 31 996011 / +30 93 7109954
Computer Shaman and Informatics Thaumaturge
The IQ of any group is the lowest individual
IQ divided by the number of feet. - PCDC in /.
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/archives
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================
More information about the Linux-greek-users
mailing list