English
Opportunities and suggestions

variables without Postfix

 

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  
 




Dieter
Zornow
The expansion the variables-Types is To begrüßen, there it still some Problems gives, because Profan some Rückgaben of DLLs not process can. The Postfix in Profan having me but because of the Übersichtlichkeit always well fallen. If one only one Teilstück viewing has was always clear circa whom variables-type it itself deals. the has me with others Programmiersprachen always disturbed, that one then always first nachschauen had circa whom type it itself deals.
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
10/22/09  
 




RGH
Hi,

for recent Types is the usage the Postfix Yes furthermore possible. compatibility becomes by me always big written! it speaks means nothing against it, it moreover so hanzuhaben How yet. example:
CompileMarkSeparation
cls
declare memory b, string s, longint l, float f
declare b#, s$, l&
declare string hugo
dim l&, 256
dim b#, 256
waitinput
byte b#,255 = 123
print byte(b#, 0)
print byte(b#, 255)
print byte(b#, 22256)
waitinput
dim l, 256
dim b, 256
byte b,255 = 123
print byte(b, 0)
print byte(b, 255)
print byte(b, 22256)
waitinput
l = 12345
inc l
print l
inc l,300
print l
dec l
print l
dec l,300
print l
waitinput
end

In others Languages (and künftig well too in XProfan) use I gladly following Notation for Variablennamen: I use one prefix, that whom type angibt, about i_Wert, l_Wert, s_Text, p_Zeiger, m_Bereich, etc. so go The variables too with fehlendem Postfix readable. In of my firm there were for Delphi and ZIM even suitable verbindliche Programmier-regulate, so The Source code too for others readable were.

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/22/09  
 




Jörg
Sellmeyer
then must but absolutely such a thing How:
CompileMarkSeparation
thereby his, otherwise writes one itself Yes stupid.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/22/09  
 



Jörg Sellmeyer, Beitrag=54576, Zeitpunkt=22.10.2009
then must but absolutely such a thing How:
CompileMarkSeparation
thereby his, otherwise writes one itself Yes...


I schreib always
CompileMarkSeparation
Kürzer GEHTS never. ^^
 
10/22/09  
 




Jörg
Sellmeyer
I find too: the Declare ought to one itself then save can...
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/22/09  
 




RGH
the Declare becomes - already because of the compatibility - stay.Also are The words String and Long already command with another weight.

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/22/09  
 



and for Arrays:
CompileMarkSeparation^^
RGH, Beitrag=54583, Zeitpunkt=22.10.2009
Also are The words String and Long already command with another weight.


to distinction geb I the Postfix on, in the hope, that nobody on The idea comes, a postfixlose Variable with Postfix deklarieren To want. ^^
CompileMarkSeparation
long a,b,c
long a&,20=5,...
 
10/22/09  
 




Thomas
Zielinski
idea1:
went indeed How in PHP and the equal. quite none solid Types on The Varialen lay.
CompileMarkSeparation
 $irgendwas = blub
 $irgendwas = 42e>

idea2:
with the Deklarierung could one it still too so make:
CompileMarkSeparation
Greeting Thomas
 
XProfan X4; Win10 x64
Der Kuchen ist eine lüge!
10/23/09  
 




Uwe
''Pascal''
Niemeier
Hi people!

If the Postfix part the Dateinamens is, would still too this imaginable:

declare memory x#, string x$, longint x&, float x!

or

declare memory x^, string x°, float x§

though too sinnloserweise

declare memory x!, float x$, string x%

(but who the power, is even self guilt)

and first if with DECLARE no type indicated is (old spelling),
becomes the Postfix ausgewertet and therefore the type certainly.
so had one still everything under one hat?

SeeYou
Pascal
 
10/23/09  
 




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  
 




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.923 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