# Maximum PC

 It is currently Tue Sep 02, 2014 3:04 am

 All times are UTC - 8 hours

 Page 1 of 1 [ 1 post ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Jass?Posted: Sat Apr 19, 2008 12:43 pm
 Team Member

Joined: Sun Jun 12, 2005 5:52 pm
Posts: 1319
Location: Infront of my Computer.
I was looking over some code in Jass, and was wondering how this would work.

Code:
function SaveLoad_Id2CId takes integer n returns integer
local integer i = n / (256 * 256 * 256)
local integer r
set n = n - i * (256 * 256 * 256)
set i = n / (256 * 256)
set n = n - i * (256 * 256)
set r = r * 64 + udg_SaveLoad_Compress[i]
set i = n / 256
set r = r * 64 + udg_SaveLoad_Compress[i]
return r * 64 + udg_SaveLoad_Compress[n - i * 256]
endfunction

If I set n to lets say, 35, wouldn't it just divide it by 256 cubed, set n to 0 based on the math it created, set i to 0, then set n to 0 overwriting its 0 again, set i to 0 again also, and just defeat the purpose of the second set of set i and n's that set them to 0 a second time. Or does it set them, and when it reaches a set r, redoes the local's and goes back to where it left off?

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 1 post ]

 All times are UTC - 8 hours

#### Who is online

Users browsing this forum: No registered users and 1 guest

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ Maximum FAQs    Forum Rules, Posting Guidelines & Announcements    The Good, The Bad & The Banned    FAQs Help/Do It Yourself    PC Building Lab    The Help Desk    PC Modding    Education & Certification Hardware    Nuts & Bolts    Portable Talk    Appraisals, Deals & Bargains (oh my!) OS/Software/Programming    Windows Parlor    Alt.OS.Abode    Games Arena    Programmers' Paradise Networking/Internet    Internet Truckstop    Network Nook In/Out    Magazine and Book Feedback    Forum & Website Feedback    Dog Pound Team Maximum PC Folding at Home    Team Maximum PC - Folding at Home - FIND CURES TO DISEASES    Team MPC - Folding Gauntlets