Jump to content

Get the remainder from divison.


Guest Guidosoft
 Share

Recommended Posts

Guest Guidosoft

I don't know of a command in autoit but if the value returned is not a integer is there a way to recieve the remainder. I need this for my new file compression include file witch counts the number of bytes to see if there are any left over that doesn't get merged with 2 other bytes.

Link to comment
Share on other sites

Guest BL@(K-R34P3R

I don't know of a command in autoit but if the value returned is not a integer is there a way to recieve the remainder. I need this for my new file compression include file witch counts the number of bytes to see if there are any left over that doesn't get merged with 2 other bytes.

You said, "if the value returned IS NOT A INTERGER, is there a way to recieve the remainder." Well... if a string is returned, how are you going to find the remainder? Oo.

Link to comment
Share on other sites

Guest Guidosoft

$x = 11

$y = 5

$z = $x / y  [2.2]

$z = Int($z) [2]

$y * $z = 10

$x - 10 = remainder

<{POST_SNAPBACK}>

thanx. Can you elaborate on how this works even because it's after 10 pm and my brain is half way dead.
Link to comment
Share on other sites

Guest Guidosoft

thanx. Can you elaborate on how this works even because it's after 10 pm and my brain is half way dead.

<{POST_SNAPBACK}>

never mind. I figured it out. Duh. ::Banghead:: :banghead:: lol.
Link to comment
Share on other sites

Guest Guidosoft

Really? I haven't read much on mod. Thanks, Valik.

<{POST_SNAPBACK}>

I usualy learn about those things just by trying it and seeing what it does but if it just gives me some crazy thing that I can't figure out and I say wtf I go do research.

Do any of you know some good compression methods. I am merging every 3 bytes into 2 bytes where the 2nd one unlocks the first two. The remaining bytes are discarded and get two stay. The file header contains that info so the decompresser knows wich ones are remaining and don't need to be decompressed it to what it's not supposed to be. But it only compresses it to 2/3 the original I think. I am just guessing around. 11:00 PM you know?

Ah, my eye lids are getting heavy. Huh? Oh. Back to the subject.

So anyway I want it to go down to 10% of the original.

Edited by Guidosoft
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...