[Tutorial] Arithmetic Symbols.
#21

Quote:
Originally Posted by Y_Less
View Post
Of course!

Firstly your division symbol is backwards. You may also want to explain the difference between integer and float division: "15 / 2 = 7" in ints and "7.5" in floats.

List of symbols you missed (and you REALLY need to read pawn-lang to see what symbols do before posting a tutorial stating that you don't know what they do, there's not really much point in that is there)?

>>> (not >>)
^
%
- (unary)
!
*=
+=
-=
<<=
>>=
>>>=
%=
/=
|=
&=
^=

I wrote an extensive review of the symbols a long time ago, but it's long gone, shame, I know Simon loved it.

That also really didn't explain binary, and you didn't mention hex at all.

What I do when writing a tutorial is write it in a file on my PC (I have a few unpublished topics floating about). I can then take time over them and research bits I don't know, instead of producing something where I don't know half the information. Either restrict the scope of your topic to what you know or look up what you don't. If someone who doesn't know what "&" does, reading this topic is not going to help in the slightest.
Do you know a place where I can study all those? I'll check the PAWN site, compuphase.com though yes. thanks alot for posting those. I shall get started. Looks really handy

-

Nice tutorial Toni, great to know people are learning from it.
Reply
#22

Quote:
Originally Posted by Lorenc_
View Post
Do you know a place where I can study all those? I'll check the PAWN site, compuphase.com though yes. thanks alot for posting those. I shall get started. Looks really handy

-

Nice tutorial Toni, great to know people are learning from it.
Yes I do know a place, but you already said it. pawn-lang.pdf is a WONDERFUL document, I don't know why it isn't included with the Windows server any more.
Reply
#23

Quote:
Originally Posted by Y_Less
View Post
Yes I do know a place, but you already said it. pawn-lang.pdf is a WONDERFUL document, I don't know why it isn't included with the Windows server any more.
You're the best Just learnt some new things that you can do with 'print(msg);'

Code:
\a’ Audible alarm (beep)
’\b’ Backspace
’\e’ Escape
’\f’ Form feed
’\n’ New-line
’\r’ Carriage Return
’\t’ Horizontal tab
’\v’ Vertical tab
’\\’ \ the escape character
’\’’ ’ single quote
’\"’ " double quote
’\% % percent sign
To some definations found could help:

Code:
*= v *= e
multiplies v with e
/= v /= e
divides v by e.
%= v %= e
assigns the remainder of the division of v by e to v.
>>= v >>= e
shifts v arithmetically to the right by e bits.
>>>= v >>>= e
shifts v logically to the right by e bits.
<<= v <<= e
shifts v to the left by e bits.
&= v &= e
applies a bitwise “and” to v and e and assigns the result to v.
|= v |= e
applies a bitwise “or” to v and e and assigns the result to v.
^= v ^= e
applies a bitwise “exclusive or” to v and e and assigns the
result to v.
= e1 == e2
results in a logical “true” if e1 is equal to e2.
!= e1 != e2
results in a logical “true” if e1 differs from e2.
Note: the following operators may be “chained”, as in the expression
“e1 <= e2 <= e3”, with the semantics that the result is “1”
if all individual comparisons hold and “0” otherwise.
< e1 < e2
results in a logical “true” if e1 is smaller than e2.
Pawn_Language_Guide.pdf is amazing.
Reply
#24

this is also great tutorial good job
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)