Author |
Message
Pages: 1
|
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [824] Creating a temporary variable - posted: 2011-11-24 18:59:49 Lets say you need a temporary variable, but you want to create it inside an inline or macro you could use several options such as using inherited variables or globals however probably the best option would be like so: Code:
a sample of it in use would be the filewrite macro: Code:
in this case the WriteFile api requires a pointer to a dword to write the written byte count, filecreate does not use it so we can just use the temporary solution as so. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [825] - posted: 2011-11-24 19:11:15 nice article , instead of push you can use this Code:
and that is useful if you need more than 4 bytes local variable inside macro so you can allocate it as that Code:
http://www.freewebs.com/ogremagic/index.htm |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [828] - posted: 2011-11-24 19:27:06 absolutely, but it should be noted that if it is for a 4 byte var then push is smaller Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Currently Active Users: There are currently 11 user(s) online. 0 member(s) and 11 guest(s) Most users ever online was 1046, January 28, 2022, 2:08 pm. Statistics: Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51 Welcome to our newest member, yecate |