Think you know filePro? Well here is a little filePro quiz to test you coding prowness. (It might be a good test to give potential filePro employees.)
The code below generates the filename of a processing table which is then Called. The question is: What is the filename that the below routine always generates?
If:
1 Then: gosub passwd
If:
2 Then: end
If: '*** Try to figure out the name of the password processing table
3 Then: '*** called by line number 16 - ***without using the debugger***
passwd If:
4 Then: s(5,.0) = mid(@tm,"1","2") * mid(@tm,"4","2") * mid(@tm,"7","2")
If:
5 Then: s = s + mid(@tm,"7","2")
If:
6 Then: an(5,.0) = rand(s)
If:
7 Then: va(5,.0) = (mod(an,"9") + "1")
If:
8 Then: va = "9" * va
If:
9 Then: f(5) = mid(va,"5","1") - mid(va,"1","1") + mid(va,"4","1")
If:
10 Then: f = f - mid(f,"4",mid(f,"4","1"))
If:
11 Then: f = f - mid(va,"3","1") + mid(va,"2","1")
If:
12 Then: fn(3) = "" { f - "1" { f - "2" {f - "3"
If:
13 Then: fn = fn + "123"
If:
14 Then: fn = fn / ("1" { mid(fn,"3","1"))
If:
15 Then: fn = ( "" { fn { chr(fn) ) - "11"
If:
16 Then: call (fn) '=======What's the filename?
If:
17 Then: return
Need help? Ken Brody solved the above and then sent me the explaination on this page. Let me know if you think this was either too easy or too hard.
Howie and the Aljex Software Team. |