Search a list of records: Difference between revisions

no edit summary
m (syntax highlighting fixup automation)
No edit summary
Line 2,708:
</pre>
Note that Phix subscripts are 1-based, hence the output of 7 not 6.
 
=={{header|Phixmonti}}==
<syntaxhighlight lang="Phixmonti">include ..\Utilitys.pmt
 
(
( "Lagos" 21.0 )
( "Cairo" 15.2 )
( "Kinshasa-Brazzaville" 11.3 )
( "Greater Johannesburg" 7.55 )
( "Mogadishu" 5.85 )
( "Khartoum-Omdurman" 4.98 )
( "Dar Es Salaam" 4.7 )
( "Alexandria" 4.58 )
( "Abidjan" 4.4 )
( "Casablanca" 3.98 )
)
 
len for >ps
( tps 1 ) sget "Dar Es Salaam" == if ps> 1 - ? exitfor else cps endif
endfor
 
len for
get 2 get 5 < if 1 get ? drop exitfor else drop endif
endfor
 
len for >ps
( tps 1 1 ) sget 'A' == if ( ps> 2 ) sget ? exitfor else cps endif
endfor</syntaxhighlight>
{{out}}
<pre>6
Khartoum-Omdurman
4.58
 
=== Press any key to exit ===</pre>
 
=={{header|PHP}}==
57

edits