Jump to content

Alexander Zueiv

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Alexander Zueiv

  • Rank
    novice
  • Birthday 09/09/1970
  1. What a hell?! This makes the function Evaluate() almost meaningless. Or do it yet understand English function names? Could you confirm that? Do they also translate the function Let()? If they do, what then should we do with their examples from their Help? ScriptParameter = "a = 5; b = 10" Evaluate("Let ( [" & Get(ScriptParameter) & "]; a + 1 )") Evaluate("Get(CurrentTimeStamp)", [FieldB, FieldC])
  2. Tell me about that! I survived after doing that with various binary files, like Word 6 and Excel 5, FMP3 for Win and WC4, various old OS's, etc. I even once made a patch to allow FMP6 index and sort Armenian text. However, none of these can change my preference that all programming code include field names must be written in plain English: A-z, 0-9, and _. BTW, I don't work for local market, so if I give a Russian name to a field that would be considered as a joke. :)
  3. Summary Field Tests for three unstored calc fields with 200K records with FMPA8.5 on iMac Intel Core Duo 2Ghz: Let ( [ a = SerialNum ; b = Left ( a ; 7 ) ; c = Right ( b ; 6 ) ; d = Left ( c ; 5 ) ; e = Right ( d ; 4 ) ; f = Left ( e ; 3 ) ; g = Right ( f ; 2 ) ] ; Left ( g ; 1 ) & Right ( g ; 1 ) ) Result: 21-22 seconds; Left ( Right ( Left ( Right ( Left ( Right ( Left ( SerialNum ; 7 ) ; 6 ) ; 5 ) ; 4 ) ; 3 ) ; 2 ) ; 1 ) & Right ( Right ( Left ( Right ( Left ( Right ( Left ( SerialNum ; 7 ) ; 6 ) ; 5 ) ; 4 ) ; 3 ) ; 2 ) ; 1 ) Result: 2
  4. And if you have a .fp3 file with, say, Russian filed names, it is simpler to trash it than to convert to .fp7
  5. It have to be in the same language as function names or else you'd get tired to switch language when typing in a code.
  6. Calculate summaries of these two fields on 100K records: Left ( Right ( Left ( Right ( Left ( Right ( Left ( SerialNum ; 7 ) ; 6 ) ; 5 ) ; 4 ) ; 3 ) ; 2 ) ; 1 ) Let ( [ a = SerialNum ; b = Left ( a ; 7 ) ; c = Right ( b ; 6 ) ; d = Left ( c ; 5 ) ; e = Right ( d ; 4 ) ; f = Left ( e ; 3 ) ; g = Right ( f ; 2 ) ; h = Left ( g ; 1 ) ] ; h ) The results should be the same while the time difference could be up to x2 (7 and 10 seconds on my Intel Core Duo 2GHz).
  7. The point is that FMP very slow works with memory. The more variables you use the slower your code works. At some level of code complexity this slowness becomes very noticeable. So I'd suggest to use nested functions instead of extra variables whenever is possible. An extra variable can speed up a code if it is used to replace several references to the same unstored calc field or some Agregate function. Fortunately, since FMP7 this replacement makes no sense for Case/If/Choose statement - last versions of FMP do not recalculate every Case as did old ones.
  8. Nice trick! I recall I've been using something like that for a type-ahead portal filter - to remove punctution characters: Let ( [ TEXT = CmpName ; SPACE = " " ; PUNCTS = Substitute ( Filter ( Upper ( TEXT ) ; Lower ( TEXT ) ) ; [ "1" ; "" ] ; [ "2" ; "" ] ; [ "3" ; "" ] ; [ "4" ; "" ] ; [ "5" ; "" ] ; [ "6" ; "" ] ; [ "7" ; "" ] ; [ "8" ; "" ] ; [ "9" ; "" ] ; [ "0" ; "" ] ; [ SPACE ; "" ] ) ; WORDS = Substitute ( TEXT ; [ Middle ( PUNCTS ; 1 ; 1 ) ; SPACE ] ; [ Middle ( PUNCTS ; 2 ; 1 ) ; SPACE ] ; [ Middle ( PUNCTS ; 3 ; 1 ) ; SPACE ] ; [ Middle
  9. Thank you! I've been reading some feeds from this site for a wile, but alas only a few forums are available through RSS. I wish there were more of them so I could be of a better help.
  10. // Function: SpaceUp ( TEXT ) // Author: Alexander Zueiv // URL: http://web.mac.com/zueiv/ // Example: TrimAll ( SpaceUp ( "SomeTestText123and456AndXYZAndMore" ) ; 0 ; 1 ) // Result: "Some Test Text 123 and 456 And XYZ And More" Case ( not IsEmpty ( Filter ( Left ( TEXT ; 1 ) ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) ) and not IsEmpty ( Filter ( Middle ( TEXT ; 2 ; 1 ) ; "abcdefghijklmnopqrstuvwxyz" ) ) ; " " & Left ( TEXT ; 1 ) ; not IsEmpty ( Filter ( Left ( TEXT ; 1 ) ; "abcdefghijklmnopqrstuvwxyz" ) ) and not IsEmpty ( Filter ( Middle ( TEXT ; 2 ; 1 ) ; "ABCDEFGHI
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.