Raised This Month: $ Target: $400
 0% 

[Suggestion] Notations, Prefixes, Symbols


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 09-28-2011 , 12:19   [Suggestion] Notations, Prefixes, Symbols
Reply With Quote #1

Im little bit tired of writing thoose big values when scripting and i wonder if its possible to break it down to something much shorter that not only are for making shorter code but for doing easier math when coding!

Example:

Notations Prefix Symbol
10 1 deka- da
10 2 hecto- h
10 3 kilo- k
10 6 mega- M
10 9 giga- G
10 12 tera- T
10 15 peta- P
10 18 exa- E
10 21 zeta- Z
10 24 yotta- Y


10 -1 deci- d
10 -2 centi- c
10 -3 milli- m
10 -6 micro-
10 -9 nano- n
10 -12 pico- p
10 -15 femto- f
10 -18 atto- a
10 -21 zepto- z
10 -24 yocto- y

is anyone capable of making this??

Last edited by RollerBlades; 09-29-2011 at 05:06.
RollerBlades is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-28-2011 , 18:21   Re: [Suggestion] Notations, Prefixes, Symbols
Reply With Quote #2

What?

I'm guessing the answer will be it won't be worth the effort if it is even possible.
__________________
fysiks is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 09-28-2011 , 19:55   Re: [Suggestion] Notations, Prefixes, Symbols
Reply With Quote #3

You could make those as defines/constants and then just multiply them:

Code:
#define mega 1000000

//...

new var = 5 * mega;
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 09-28-2011 , 20:03   Re: [Suggestion] Notations, Prefixes, Symbols
Reply With Quote #4

Quote:
Originally Posted by Emp` View Post
You could make those as defines/constants and then just multiply them:

Code:
#define mega 1000000

//...

new var = 5 * mega;
Would it work to do this?
Code:
#define mega (* 1000000)

new var = 5 mega;
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 09-28-2011 , 21:13   Re: [Suggestion] Notations, Prefixes, Symbols
Reply With Quote #5

Code:
#define mega   * 1000000

new var = 5 mega;
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-29-2011 , 02:36   Re: [Suggestion] Notations, Prefixes, Symbols
Reply With Quote #6

I'm impressed. It still wouldn't have been worth my time IMO. lol
__________________
fysiks is offline
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 09-29-2011 , 05:04   Re: [Suggestion] Notations, Prefixes, Symbols
Reply With Quote #7

could you fix a .inc file with all of them?
RollerBlades is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-29-2011 , 21:54   Re: [Suggestion] Notations, Prefixes, Symbols
Reply With Quote #8

Quote:
Originally Posted by RollerBlades View Post
could you fix a .inc file with all of them?
You can do it, it's extremely simple. It will take you like 2 minutes.
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode