English
Opportunities and suggestions

variables without Postfix

 
- Page 1 -



RGH
Hi,

How already implied, would like I künftig new Variablentypen in XProfan make possible. the requires a ziemlichen Umbau in the Datenhaltung. In one first step I had this Umbau implemented, without but the Syntax To change.
Bislang we the type of/ one variables How in the klassischen Basic through one Postfix, the last characters the Variablennamens, definiert: !, %, &, $ or #. The Parser was means very hereon ausgelegt and erkannte and Difference variables on this Postfix. now set the question, take off Postfixe could one whom yet using? finally should The characters on the keyboard within easy reach his. there stayed yet such characters How °, § and €. One trouble: On international Tastaturen there The characters partly not. (OK, not so dramatic, there the international currency XProfans still very in border holds.) the Hauptproblem: thereafter is Schluß. € could yet for a Währungstyp go through.
The temporary Solution: turn away of Postfix. moreover had the Parser complete rewritten and be too yet some command and functions, The Variablennamen as Parameter desires (about CLEAR, DISPOSE, DECLARE, PARAMETERS, CLASSOF, SIZEOF, etc.). Also need it for Variablennamen without Postfix another new Syntax, around the type To to determine. and 100%ig compatible to recent Syntax ought to it too his. so sees The Solution by me to Time from (and becomes soon on the first Tester weg):

Declare <Typ> <Name>, <Typ Name>, ...
Parameters <Typ> <Name>, <Typ Name>, ...
Var <Typ> <Name> = <Wert>

The recent Types hot STRING, INTEGER, LONGINT, FLOAT and MEMORY.*

new and previous Syntax can discretionary mixed go. To mind is naturally, that with variables with Postfix this characters part the Namens is. so are so bislang already X$, X&, X%, X! and X# different variables, which by the Postfix discern. means go künfig too STRING X and X$ two different variables his. there one Variablenname not twice vorkommen must, becomes it natütlich Nich at the same time a STRING X and a LONGINT X give can. (for User another Programmiersprachen a Selbstverständlichkeit.)

so plenty for the time being moreover. As I said: by me functions it already.

Greeting
Roland

* imaginable wären too The terms STRING, INT, LONG, FLOAT and MEM
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/22/09  
 



 
- Page 1 -



RGH
@Thomas: your suggestion with VAR would not compatible with the jetzigen shape the Deklaration and the type first with the first Zuweisung To to determine would too gänzlich inkompatibel and one Compiler very difficult umzusetzen. the would presumably too one very ernstes trouble for Profan2CPP go.

The command to Deklaration stay so How you're: DECLARE and VAR.

I schwanke yet between whom Typbezeichnungen "INTEGER, LONGINT, FLOAT, STRING, MEMORY" on the a and "INT, LONG, FLOAT, STRING, MEM" on the others Page. for the longer Variante speaks, that these Typbezeichnungen itself already by the complete Using XProfan go through with and the Aufsteigern familiar sind; for kürzer Variante speaks The comfort some Programmer.
(integrally Tippfaule and Assemblerfreaks with a foible for DreiBuchstabenBezeichner would presumably INT, LNG, FLT, STR and MEM suggest. ;) )

Jörgs suggestion to comfort at Entippen must I time rethinking. Presumably is it leichter program, as in the Help for Beginner verständlich dargelegt. ;)

@Pascal: No afraid, derartiger nonsense won't possible his: either one Postfix (How yet) or a Typangabe! If one Variablenname one Postfix has, then definiert this at DECLARE, VAR or PARAMETERS whom type. "DECLARE String Test$" would to a Error Message lead, just as as bewusste Irreführung "DECLARE String test&".

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/23/09  
 




Jörg
Sellmeyer
how'bout so with the Hilfetext:



Deklarationen erfolgen How yet with the Schlüsselwort "Declare".

Declare Text$, number%, Kommazahl!

now can also yet the Variablentyp moreover indicated go. then falls the Postfix as Namensbestandteil lane:

Declare string s1, s2, s3
Declare integer number1, number2

but too:

Declare string s1, integer number1, longint grossezahl1

behind of/ one Typbezeichnung can several variables in groups declared go:

Declare string s1, s2, s3, integer number1, number2, float f1, f2

meaningfully with this manner the Variablenbenennung (without Postfix) is a Kennzeichnung z. B. through one vorangestelltes characters:

Declare string sText, sZeile, integer iBreite, iLaenge, float fEndSumme


I had too nothing against The Dreibuchstaben-Variante. Perhaps optional...
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/23/09  
 



 
- Page 2 -



Dieter
Zornow
it would indeed time interestingly To experienced, circa wieviele new Types it itself deals and which the are.
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
10/23/09  
 




RGH
Dieter Zornow, Beitrag=54593, Zeitpunkt=23.10.2009
it would indeed time interestingly To experienced, circa wieviele new Types it itself deals and which the are.


yet there quite no new Types. before I me above thoughts make, I will first times the Possibility create, such einzuführen. demand get already QuadInt, Unsigned Integertypen, Single (32-bit Floats), Boolean, etc. imaginable wären too Types How Date, WideChar, etc.
As I said, for the time being goes it only therefore, The Possibility To create.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/23/09  
 



is naturally too always Geschmackssache, I had me then streng for jeweilige Kurzversion decided.

Longint > Long
Integer > Int
Memory > Mem
Boolean > Bool
Float > Float
String > String
byte > byte

the left is basichafter, other moderner - i'd both make possible.
 
10/24/09  
 




Nico
Madysa
as -- possibly last -- Variablentyp, the too one Postfix has (for may part §) schlüge I 64-bit-Integer to, with them one in Gigabytebereich calculate can. The are me time, as i Festplattengrößen indicate wished, very necessary become.
 
Nico Madysa
10/24/09  
 




ByteAttack
Perhaps could one The variables self verschnellern in the one same with the Deklarierung a worth zuweist.
example:
Declare worth%=5000, worth$="Hallo Welt", etc...

then would the code mean I faster walk? or ?
 
Website:  [...] 
Facebook:  [...] 
10/26/09  
 




RGH
Marc-Gordon, Beitrag=54622, Zeitpunkt=26.10.2009
Perhaps could one The variables self verschnellern in the one same with the Deklarierung a worth zuweist.
example:
Declare worth%=5000, worth$="Hallo Welt", etc...

then would the code mean I faster walk? or ?


to that a: For this there whom commands VAR
to that others: an Variable becomes Yes there inserted, where itself the worth in the running the Program through Zuweisung often changes. then might The little Zeitersparnis with the first Zuweisung not meßmar in that weight entrapments. (If itself the worth not changes, is a Constant empfehlenswerter. The is explicit faster.)

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/26/09  
 




RGH
Nico Madysa, Beitrag=54603, Zeitpunkt=24.10.2009
as -- possibly last -- Variablentyp, the too one Postfix has (for may part §) schlüge I 64-bit-Integer to, with them one in Gigabytebereich calculate can. The are me time, as i Festplattengrößen indicate wished, very necessary become.


it'll definitiv none new Variablentyp with Postfix More give. but the QuadInt could the first Type of new Syntax go.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/26/09  
 




Dieter
Zornow
One vorzeichenbehafter 32bit Float-worth would neither badly. some DLLs give something like back and one can not in Profan take. it comes even in some Make to that Programmabsturz.
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
10/26/09  
 




RGH
Dieter Zornow, Beitrag=54626, Zeitpunkt=26.10.2009
One vorzeichenbehafter 32bit Float-worth would neither badly. some DLLs give something like back and one can not in Profan take. it comes even in some Make to that Programmabsturz.


On the type Single have I in the doing already virtual.
but too now already can in XProfan with derartigen DLLs works (almost any Open-GL-Aufrufe using 32-bit Floats (=Single)):
If the DLL one Single as Parameter expects: an XProfan-Float (double) with the function Single() on a LongInt mappen and this the DLL transfer.
If the DLL a Single zurückgibt: the Result first of all into LongInt take in and then with the function double() into XProfan-Float wandeln.
(See in the Help the chapter "28.9 - Hilfsfunktionen for 32-bit-Fließkommazahlen".)

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/26/09  
 




Dieter
Zornow
It's all right in the special around the Audiogenie.dll and there were Yes then any try not successful. in the meantime has Stefan some important Results extra for Profan-User extended. but The Floats are as always not To take.
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
10/26/09  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.652 Views

Untitledvor 0 min.
Vgdd06/05/17
rquindt12/23/16
Peter Max Müller05/13/15
Heltal09/30/14
More...

Themeninformationen



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