generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: A macro

Previous Thread :: Next Thread 
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
09 Oct 2012 03:59 PM
Can someone explain to me what a macro is and an example? I looked it up and said

"a macro definition defines how to expand a single language statement or computer instruction into a number of instructions."

But from that sentence that makes me think it's just a function and when you call that function it's that single statement.

Thanks again guys.
Report Abuse
Brandonhare is not online. Brandonhare
Joined: 02 May 2007
Total Posts: 11005
09 Oct 2012 04:10 PM
It's just a function


function macro()
doLotsOfStuff()
end


macro() --single statement which does more stuff
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
09 Oct 2012 04:12 PM
That's what I thought from reading the definition. But wasn't sure because none of you guys nor scripting helpers really talk about it.

Well thanks, brandon.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
09 Oct 2012 04:25 PM
Lua doesn't really have macros. However, things like C do. This is an example of what only a macro can do:

    #define until(x) while(!(x))

    int x = 10;
    until(x == 0) {
       x--;
    }
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
09 Oct 2012 04:59 PM
Oh the joys of C[++] macros
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image