Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Homer Simpson coding puzzle
Message
De
26/02/2001 04:15:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/02/2001 15:57:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00479329
Message ID:
00479415
Vues:
22
>Hey all. Simple test of the "doh!" principle here: The question is 'What will end up being printed on the screen?' .. Yes, I know the answer - just testing y'all :-)
>
>And, no, it's not the GenPrimary() UDF
>
>
>OPEN DATA foomeister
>CREATE TABLE foo (pk C(30) PRIMARY KEY,amount N(10,2),quantity N(4,0))
>INSERT INTO foo (pk,amount,quantity) VALUES (GenPrimary(),100.15,1)
>SELECT * FROM foo WHERE amount > 200 INTO CURSOR foobaby
>SELECT foobaby
>DO CASE
>CASE foobaby.amount = 0.00
>  ?"No Sale"
>CASE RECCOUNT('foobaby') = 0
>  ?"No records"
>CASE foobaby.amount <= 200
>  ?"Small spender"
>ENDCASE
John,
What would the answer be if (assuming preceding lines were never exposed):
SELECT * FROM foo WHERE amount < 200 INTO CURSOR foobaby
SELECT foobaby
DO CASE
CASE foobaby.amount = 0.00
  ?"No Sale"
CASE RECCOUNT('foobaby') = 0
  ?"No records"
CASE foobaby.amount <= 200
  ?"Small spender"
ENDCASE
< bg >

I don't remember the exact numbers but this question was asked in our highschool physics exam :

A bear sits on top of tree that's 44m high. The bear falls and it takes 3 secs for it to hit ground. What's the color of bear ?

We were all stumped at first but there was a solution (wish I remembered the numbers right).
x=1/2gt^2 and result g was only possible for a polar bear :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform