English
Forum & Help

Sprachelement: var

 
- Page 1 -


var Bezeichner [ = worth ] [, Bezeichner [ = worth ], ...

Deklariert Variablenbezeichner and points them ggf. values To.

it can as much as you want variables prepares go, allows for Bezeichnernamen are letters and Digits and the first characters must one character his. too allows are The characters _ and .

Info: Var as function can uses to be whom Variablentyp zurückzuerhalten.

Related: § 5 - Datentypen

Examples of The usage of variables:

Einfache Variable:
var a,b,c
a=10
b=20.5
c="Hallo Welt"
print a,b,c// gives 10 20.5 Hello World from

Einfache Variable, kompaktere spelling:
var a=10,b=20.5,c="Hallo Welt"
print a,b,c// gives 10 20.5 Hello World from

aray:
var a=[10,20,30]
print a[1]// gives 20

Assoziative Arrays:
var a=["Magnet"=5,"Faktor"=5.5,"Farbe"="Grün"]
print a["Faktor"]// gives 5,5

Arrays as Objects:

Arrays as Objects:
var a,a.list
a.lodestone=5
a.factor=5.5
a.colour="Grün"
a.list=50
print a// gives magnet=5, faktor=5.5 farbe=Grün from, but not liste=50 there a.list through var eigenständig declared watts.

type of/ one variables relating:
var a="Test"
print var(a)// gives string from

Keywords: var,declare,gettype

 
12/01/14  
 



 
- Page 1 -



HofK
"Es be because, to sqrt becomes as long as numerisch "gedacht" as goes."

I had it hoped, but not absolutely expects, because derartig lästige Sonderzeichen sparendes, really vereinfachendes have I with whom gängigen Languages yet not seen. gives it the at all already somewhere?

sure must one it so bring into action, that The Übersichtlichkeit not To short comes. This will itself useful quick show.

The Präkompilierer with the Syntaxeigenschaft/Syntaxmittel Kodeergänzung through Space Operator earn possible a own Paragraphen, with § 7 Operators goes the Space Operator something under and is Yes then too no klassischer Operator.

the space, the Space Operator is a intelligenter Space Seperator, one intelligenter Trenner, one Space-Autoseparator short one Autoseparator, one polymorpher Seperator, so yet something polymorphes with InfinityProfan.

" ... the to whom logischen Operators aufgelöst becomes ... it can only of right to left aufgelöst go." is integrally important to that understanding and ought to into Paragraphen mere. Can whom zugrundeliegenden Algorithmus short/vereinfacht/clear present?

Freue me already auf's konstruieren and explain of Examples to Syntaxeigenschaft.
 
05/16/15  
 



 
- Page 2 -


Klaus Hoffmeister (16.05.15)
I had it hoped, but not absolutely expects, because derartig lästige Sonderzeichen sparendes, really vereinfachendes have I with whom gängigen Languages yet not seen. gives it the at all already somewhere?


is I do not famous! Perhaps. have I there Yes what made up.

Klaus Hoffmeister (16.05.15)
the space, the Space Operator is a intelligenter Space Seperator, one intelligenter Trenner, one Space-Autoseparator short one Autoseparator, one polymorpher Seperator, so yet something polymorphes with InfinityProfan.

" ... the to whom logischen Operators aufgelöst becomes ... it can only of right to left aufgelöst go." is integrally important to that understanding and ought to into Paragraphen mere.


OK, I write the still with mere. a extra § would like I for not eröffnen I me so momentarily heavy do.

Klaus Hoffmeister (16.05.15)
Can whom zugrundeliegenden Algorithmus short/vereinfacht/clear present?


this is too so a thing The I do not rule. Perhaps. as textalisches
Struktogramm:

as long as somewhere Freizeichen in Befehlszeile* ( parse of Freizeichenposition to left the Schlüsselwort, if found then ists a FN? { parse complete argument* to right and set it in clinging | set one comma } )

*by rekursiver Algorithmus there a "Befehlszeile" as well as one complete argument too one Teilargument his can)
 
05/16/15  
 



iF (01.12.14)
...
Var can also uses to be whom Variablentyp zurückzuerhalten. In this case is Var as function To use: a=1.1;print var(a) //gives float from.
...


the functions now!
 
11/12/15  
 



HofK (24.02.2016)
If then sometime another Sonderzeichen for var( ) How °a remain ought to - see Discussion under  [...]  - would it superzumquadrat!

Seinerzeit was too The question, whether one instead of var(a)=="long"
only var(a)==long
To write make possible could.


there You The Murmel apparently very gladly like,

have I The simply time installed!

what however you don't say so his becomes:
var(a)==long
//instead of
var(a)=="long"

Syntaktisch closes the Space-Operator Function-Gleichnamige Konstanten first from:
print long a//print(long(a)) or print(long,a)

self by comma force would here useless, there then long() instead of long, otherwise went too screen.width instead of screen.width() not etc. so would means too $alias long "long" To beschädigtem Queltlext lead.
 
02/25/16  
 




HofK
iF (25.02.2016)
there You The Murmel apparently very gladly like,
...


then yet these Murmeln:

 [...]  [...]  and not only these Murmeln here, krame straight in middle-aged Unterlagen, thereby fell me my work of 1975 into Hands - concise 100 pages with typewriter and handgemalten Symbolen - computer then yet Fehlanzeige.



always beautiful The Walze the typewriter with of/ one hand high- and runterdrehen and the others hand with a fingers type. has well some weeks gedauert. and in the last row the Page then one mistake in writing. with Durchschlagpapier. The "guten" middle-aged times, against it is the Today Murmelspiel Kinderkram. 

therefore my "Symbolkreativität".

the var(a)==long itself with the other Syntax not verträgt is einsichtig. but there must one The Flinte not yet in that grain throwing.

The Murmel, the Gradzeichen ° pressing whom strain a thing from. with the temperature gefriert the waters somewhere and elsewhere verbrennt one itself capable.

with whom variables is it now the "Grad" the picture in memory. with long right simply, with aray something komplizierter.

The "Grade" are zero, long, ... aray.
means about as Konstanten for Speicher"grade" representable?

if °a==°long or about if °a==long°

naturally has too The statement in Stringform How "long" your amenities.

fit first the example polymorphe procedure  [...]  with °a instead of var(a) etc. on.
 
02/25/16  
 




HofK
"Passe first the example polymorphe procedure  [...]  with °a instead of var(a) etc. on."

is vollzogen, sees clear from and functions lovely!
 
02/25/16  
 



deference: it follow important Changes.

in example there nachfolgend The instruction "var" not any more, there tappt im dunkeln not necessary is and one variables simply use can without tappt im dunkeln extra deklarieren To must.

therefore too this issue out from Functions into to Forum moved. whether still a _Funktion "var" necessary is - particularly because of the ° Sonderzeichen, is too fraglich. Presumably sooner not.

additionally a important Änderung:

variables are always pub, Procedures having only Access to by global listed variables.
 
02/28/16  
 




HofK
iF (28.02.2016)
whether still a function "var" necessary is - particularly because of the ° Sonderzeichen, is too fraglich.


having hardly To hoping ventured, that it with the by indicated definierten variables something becomes. super! an var function to that detect the Type is then sure kontraproduktiv, already because one because of the Space Operators then too

a = 1.5
t = var a

write could, what still something "eigen" would, against it is
a = 1.5
t = °a

perfect.
 
02/28/16  
 



Have nevertheless again bow installed,

quick to fix - goes almost garnichts otherwise.
 
02/28/16  
 




HofK
Bug' s are the salt in in the Programmsuppe,
otherwise becomes it yet tedious
 
02/28/16  
 



so, be hopefully now over Gröbste away.

cool something like:
a=5, b=6

or
a=5 b=6 c=[...

or here be proud How atze:

print Test().inherit.0

lol.mydatas.vendor=test().vendor
lol.anotherclass.attrib=test().size

print lol

wald=[
"trees"=[
"hans" "ralf" "fred"
]
"gui"=gui.grid gui.hwnd [5,5]
]

gui.theme woods.gui gui.theme.debug

print woods.trees

//

proc Test
a=[
5
6
7
]
return [
"color"=rgb 0 0 0
"size"=50
"vendor"="Yamasupa"
"inherit"=a
]
endproc



Can means Structures create and them circa itself throwing.

 
02/28/16  
 




HofK
iF (28.02.2016)
Can means Structures create and them circa itself throwing.


... and Beginner hard on the head so meet. the example is a lovely massives Wurfgeschoss for.

but one sees same many Opportunities right squat and me remaining work it step for step rüberzubringen. Virtually with Wattebällchen throwing is with the material angesagt.

Freue me on it. ------
 
02/29/16  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

15.384 Views

Untitledvor 0 min.
RudiB.03/20/20
maroro07/25/16
Sascha Patzsch03/23/16
Pedro Miguel03/16/16
More...

Themeninformationen

this Topic has 2 subscriber:

iF (13x)
HofK (10x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie