Results 1 to 4 of 4

Thread: Modular function

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    13

    Talking Modular function

    Does this sound good?

    PHP Code:
    Function Modular(Num1Num2)
       
    Divided Num1 Num2
       
    If Divided Int(DividedThen
          Modular 
    0
       
    Else
          
    FractionPart Divided Int(Divided)
          
    Modular FractionPart Num2
       End 
    If
    End Function 

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    You found a workaround, nice one It gave the same result as 12345 Mod 6 so i'd say so. Code looks good too (apart from you haven't declared any of the variables!)

  3. #3
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    13
    I know... I usually declare the variables... I will probably do it when I finish the program...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width