| |
|
|
- Page 1 - |
|
| § 7 - Operators
+ | addition
| ++ | Increment
| += | Increment circa X
| - | Subtraktion
| -- | Decrement
| -= | Decrement circa X
| * | Multiplikation
| / | Division
| \ | Division (ganzzahlig)
| % | Modulo (Divisionsrest)
| ^ | Potenz
| | | or (binary)
| || | or (logical)
| & | and (binary)
| && | and (logical)
| ! | NOT
| << | bitshift left
| >> | bitshift right
| < | small
| <= | small same
| > | larger
| >= | larger same
| <> | mismatched
| != | mismatched
| = | worth-Zuweisung
| == | same (comparison)
| === | utterly same (comparison whether worth and type coincide)
| ?: | Ternärer Operator, a==b?10:20, if a same b is, then 10 otherwise 20.
| | Space-Operator (Freizeichen), really no Operator separate a spoke/ Syntaxeigenschaft, näheres moreover under: [...]
|
|
|
|
| |
|
|
|
| |
|
- Page 1 - |
|
Michael W. | ...and with Potenzen becomes often the double star using, How supra already written. then wären Yes any "eingetütet". |
|
|
| XProfan X3System: Windows 8/10, XProfan X4 Programmieren, das spannendste Detektivspiel der Welt. | 12/02/14 ▲ |
|
|
|
|
| I faith Roland takes ^, what find You rather? |
|
|
| |
|
|
|
Michael W. | One single characters is rather, means (4^3) == 64. its too verständlicher, there it Yes 4 high 3 spoken becomes. |
|
|
| XProfan X3System: Windows 8/10, XProfan X4 Programmieren, das spannendste Detektivspiel der Welt. | 12/02/14 ▲ |
|
|
|
|
| find so did i, make we so. |
|
|
| |
|
|
|
| |
|
| |
|
|
|
| now is even the following possible:
c=0
d=1
print d+ ++c
//gives 2 from and c has here the value 1
|
|
|
| |
|
|
|
| I faith there's yet in yet none Programming-Language a Vergleichsoperator bestehend from 4 Gleichheitszeichen.
In AndroidProfan yet:
= Zuweisung == Wertevergleich === values and Typenvergleich
well then my idea: 4 Gleichheitszeichen Operator:
==== Typenvergleich
supply whom Wertetyp the left Page the Argumentes.
in example
var a=10 print(a====) //spending: long
or
if (a====long) ...
Gegenstellen could one naturally a function z.B. namens "typeof" or "type" - there tendiere I there withal the imho quite a lot interessanten invention the 4 Gleichheitszeichen.
what means the community? |
|
|
| |
|
|
|
| @Michael:
have time obigsten Posting scheduler on The einfachere Beitragssytax umgestellt lane of HTML. |
|
|
| |
|
|
| |
|
- Page 2 - |
|
|
HofK | the sowohl != as well as <> useable is find I very well. hereon entrapment I at change between whom Languages over ands over again time mere!
iF (30.01.15)
==== Typenvergleich
supply whom Wertetyp the left Page the Argumentes.
==== is integrally beautiful long. the == is already a "Hilfskonstruktion" because the Zuweisung "ergibt itself aus" with = beautiful short is really something How <- , <-- , <== or even usual := (I none so treffend find) his ought to around the direction and the Zuweisung anzudeuten.
its "==== Typenvergleich" really no comparison, separate "Ergebnis <-- Argument".
In some Languages must one Yes whom type constantly mitschreiben, How a%, a&, a$ ... benefit - one has whom type always in the look. disadvantage- Schreibarbeit, sees not absolutely clear from.
how'bout with a einfachen symbol hinten (or about before it) on the variables The then whom type supply.
means print(a?) // spending long etc.
or even print(?a)
or rather print(a°), print(a~), print(a#) , ... - müssten still possible yet syntaktisch possible his if one The allowed Sonderzeichen with Variablenbezeichnern properly vorgibt. |
|
|
| |
|
|
|
HofK | The Operator + isn't How in the list the Operators (apparently only alone) The addition, separate too The link of Zeichenketten.
there Grundlegendes nocheinmal on the Prüfstand is a Überlegung, even if i think, that The Realisierungschancen in the Promillebereich - with alcohol is since the effect already heavy! - lying.
but above to think can hardly damage.
in the Context with [...] and because I again once hereon hereingefallen be, though it me mere theoretical completely clear is, nocheinmal something to Konkatenation.
there was is time again happens:
xppmax = (ord(tx[0])-96)*10 + tx[1]
Infinity-Profan knows Yes no solid Types for variables, a variable and boxes can to Laufzeit whom Inhaltstyp Change. so is outwardly not discernible, what in the Beispielzeile objectively happens. here was is then append the Digits from tx[1]. In tx[1] was of course a number, but since tappt im dunkeln a verschachtelten Prozeduraufruf a Dialogeingabe weitergeleitet watts was tappt im dunkeln of type string. it given too none formalen Error in the further processing, there through implizite Typumformung letztendlich a number available stood. only The was with regard to content wrong.
with of/ one expliziten Typwandlung
xppmax = (ord(tx[0])-96)*10 + long tx[1]
sustained I the really intended Result. but in another drop can straight The Zeichenkettenverknüpfung pseudo his. The "Missbrauch" the Additionsoperators into Programmiersprachen disturbing me always just as How the t less online, means The large firm where online abgezogen becomes. the only, because one The really korrekte name hyphen To stale and long finds and english even too less using becomes.
there's thoroughly others Konkatenations-Operators How whom point in php. but the is so simply neither clear because of the Objektschreibweisen and the spelling for assoziative Datenfelder. but twice taken, what itself too well writes and "Abstand" to Overview creates? sure there with .. but others Problems?
so would it:
xppmax = (ord(tx[0])-96)*10 .. tx[1]// Konkatenation with Typumwandlung To string
xppmax = (ord(tx[0])-96)*10 + tx[1]// only yet addition with Typumwandlung To float/long
in the further typischen Examples sähe The Konkatenation so from:
hope, I do not same refer. |
|
|
| |
|
|
|
| it would for me no trouble from:
..
simply:
+st(parse1argument)
To make. |
|
|
| |
|
|
|
HofK | as alternatives Kokatenationszeichen rewards it itself Perhaps not, though it right clear appear and one for itself .. and + separate can. The above-mentioned Error träte but moreover on, unless long() using becomes.
my eigentliches border is in the Quelltextbox evtl. something extinct. objectively power the hoisted only really sense, if + mere arithmetisch becomes, The Operators "sauber" separated go:
xppmax = (ord(tx[0])-96)*10 .. tx[1] // Konkatenation (only ..) with Typumwandlung To string
xppmax = (ord(tx[0])-96)*10 + tx[1] // (+) only yet addition with Typumwandlung To float/long
now there still ? |
|
|
| |
|
|