Ondrej Jombik <ne...@po...> writes:
> Maxim, 20:46:05
> 28. jun 2002 (piatok)
> Greetings!
>=20
> Following metar causes several warnings:
>=20
> cc: IN, icao: VABB
> 201530Z VABB 24012KT 5000 FU FEW018 SCT025 28/22 Q1004 NOSIG
Thanks for the report - I've tried to fix it. Raymond: is the fix
correct?
=20
> I have one another question. What does it means "The
> temperature feels like"? I don't understand this issue, so I can't
> properly translate it into Slovak language. I hope your explaination
> will help me.
I'll give it a try: By combining the windspeed and the temperature we
can calculate a 'windchill' factor. This temperature tells you how a
human would perceive the temperature, e.g. the wind feels cold if it's
blowing strong.
Likewise, by combining the temperature and relative humidity we can
calculate a 'heatindex'. This is only used if it's hot.
One of these temperatures are appended to the 'feelslike' string.
By the way: I think we should change this so that the 'feelslike'
string is used as a format string to sprintf() instead of just
appending the temperature to it. By using the string as a format, it's
easy for the translator to put text after the temperature - that isn't
possible now.
That applies for a lot of the strings: the code in pw_test.php should
not just concatenate the strings (like it does now) - we should use
sprintf() instead. And now that we're only interested in PHP4 and
later, then we can use *argument swapping* like this:
$format1 =3D 'There are %d monkeys in the %s';
$format2 =3D 'The %2$s contains %1$d monkeys.';
where both formats can be used with the same call to printf():
printf($format, $num, $location);
This is a powerful technique which we ought to take advantage of.
=2D-=20
Martin Geisler My GnuPG Key: 0xF7F6B57B
See my homepage at http://www.gimpster.com/ for:
PHP Weather =3D> Shows the current weather on your webpage.
PHP Shell =3D> A telnet-connection (almost :-) in a PHP page.
|