English
Regulars table & Café

Done: Inkey$

 

Detlev
Wulff
i will transfer of Powerbasic to XProfan, have Full Version 10, but me bereitert some Problems, namely the are missing elementarer Basic-Befehlsgruppen, How ASC(),Inkey$() etc. i'm then simply started with the vorhandenen command To play and by attempt and mistake to that target To come!
now but I come not further, because the Rücksprung into Menu-display with Result 0 or größergleich 16 simply not functions:
CompileMarkSeparation
-Begin-----------------------------------------------------------------
declare key$, KeySum$, ZZC%
Cls
men:
Menüansicht
print "Menü: Zweizifferncode 01 .. 16"

WhileLoop 2 Schleife für zwei Segmente!

    fr0:
    WaitScan

    If @chr$(%Key) = ""

        goto "fr0"

    ElseIf %Key<48 or %Key>57

        goto "fr0"

    EndIf

    key$ = @chr$(%Key)
    KeySum$ = KeySum$ + Key$
    Print %ScanKey, Key$, %Key

EndWhile

ZZC%=Val(KeySum$)  Umwandlung Zweizifferncode integerwert

If  ZZC% <=0 or ZZC% >= 17   wenn der Wert Null oder größer als 17 ist dann das Menü anzeigen; funktioniert nicht

    goto "men"

EndIf

-End-------------------------------------------------------------------
print KeySum$,ZZC%
waitkey
End
 
12/18/09  
 



Hello Detlev,

couple "Probleme" see I in code.

in example ought to one well instead of
CompileMarkSeparation
ElseIf %Key<48 or %Key>57re>
rather
CompileMarkSeparation
ElseIf (%Key<48) or (%Key>57)re>
and rather
CompileMarkSeparation
if (ZZC% <=0) or (ZZC% >= 17)re>
write (in nativen functions [...]  functions it however too so How You it written have) and You spring with Goto from Blöcken out:
CompileMarkSeparationwhich also IMHO not "erlaubt" is (against not in nativen functions). i'd complete on Goto dispense. Look too ord , break , continue .
 
12/18/09  
 




RGH
1. To Asc():
The function Asc() standing in BASIC for Ascii-code one Zeichens. under windows having we but none Ascii-Zeichensatz separate z.B. whom Ansi-Zeichensatz or quite a others. therefore has here these function in Anlehnung on Delphi whom neutraleren names Ord() for or = Order. concise: supplant Asc() through Ord().

2. To Compare:
How Help To entnehmen is, orientiert the Hierarchie the Operators sooner on Delphi or. Pascal (and others Languages) reading on BASIC, so that To clinging is. Quote from the Help:



Info: The Hierarchie corresponds to vaguely the under PASCAL and weicht from the BASIC-Hierarchie ex. The Vergleichsoperatoren (...) are BASIC higher classed. from BASIC:

If A% > 6 AND A% <= 20 THEN
<...>
End If

becomes in XProfan:

If (A% > 6) AND (A% <= 20)
<...>
EndIf

In PASCAL would one write:

If (A > 6) AND (A <= 20) THEN BEGIN
<...>;
End;


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
12/18/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

3.882 Views

Untitledvor 0 min.
Walter05/09/21
rquindt01/27/16
Untitled05/14/12

Themeninformationen

this Topic has 3 subscriber:

RGH (1x)
iF (1x)
Detlev Wulff (1x)


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