English
Forum

the GOTO commands

 
- Page 1 -



FLINN
moin first THANK YOU all The me already helped having,
I have here altes listing of me this is in (old BSIC) i want it gladly in XPROFAN write now there Yes there no Zeilennummern How verfahre I now with the GOTO commands without Zeilennummern?
be tensely on eure Answer)

1 PRINT CHR$(147)
2 PRINT"GIB EINE ZAHL EIN"
3 COLOR 0,1
4 PRINT" A =1"
5 PRINT" B =2"
6 PRINT" C =3"
7 COLOR 0,1
8 COLOR 1,6,4
9 INPUT"LOS DEINE ZAHL";A
10 ON A GOTO 12, 13, 14:GOTO 18
12 PRINT"DU HAST 1 GEDRUECKT":END
13 PRINT"DU HAST 2 GEDRUECKT":END
14 PRINT"DU HAST 3 GEDRUECKT":END
15 PRINT"DU HAST 3 GEDRUECKT":END
16 PRINT
17 PRINTRINT
18 PRINT"DANKE FUER DEINE MITARBEIT ABER
DIE EINGABE IST FALSCH DU BIST RAUS!"
 
11/04/17  
 



« this Posting watts as Solution marked. »


H.Brill
Help reading

If you absolutely for the time being at GOTO stay
want, nimm instead of the Zeilennummer one Label :
Label1:
Print "Du have 1 gedrückt"
End
Label2:
Print "Du have 2 gedrückt"
End
Label3:
Print "Du have 3 gedrückt"
End

but i'd there not so much waste time. Goto
and Gosub there in next Time not any more. former
watts the as substitute to the present Procedures
taken.
Declare GemerkteZahl&, EingabeZahl&, Ende&
Ende& = 0
MerkeZahl()
EingabeMaske()

WhileNot Ende&

    If Eingabezahl& > 0

        If EingabeZahl& <> GemerkteZahl&

            Beep
            Locate 4, 46 : Print " "
            Locate 4, 46 : Input EingabeZahl&

        Else

            EndeProc()
            Ende& = 1

        EndIf

    Else

        Ende& = 1

    EndIf

EndWhile

Proc EingabeMaske

    CLS
    Locate 1, 1  : Print "ENDE with input 0 !"
    Locate 2, 1  : Print "Der PC has a number Pinned !"
    Locate 4, 1  : Print "Bitte a number between 1 and 9 prompt : "
    Locate 4, 46 : Input EingabeZahl&

ENDPROC

Proc MerkeZahl

    ' number between 1 and 9
    ' through chance detect
    Randomize
    GemerkteZahl& = RND(9 - 1) + 1

ENDPROC

Proc EndeProc

    Locate 8, 1 : Print "RICHTIG !!!!!"
    Locate 9, 1 : Print "Bitte Button to that terminate pressing..."
    WaitKey

ENDPROC

 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
11/04/17  
 




p.specht

The plunge results then with ´Goto "Label1"´.

I copy whom View source 2 time, where I from the 1. part any variables for the in XProfan nötige "Declare" extract (In Basic: DIM or automatisches lay out). too ´GoSub "G100" is then possible (otherwise behave itself GoSub, as wären Variable only pub validly). too on others Besonderheiten must one respect: Sqr() is in XProfan SQRT() etc. etc. all with Goto angesprungenen Zeilennummern one G prefix and colon <return> append...
G100:
(with Gosub-Labels place I one s forth).
Restliche Zeilennummern weglöschen, to Print heard one space. - greeting

P.s.: i'm and stay "GOTO"-fan. many old programs do yet always Nützliches, and it would pity, everything new strukturieren To must. Edsger Wybe Dijkstra in honour, but seinem "Goto considered harmful!" standing as always The opinion to "Dijkstra considered harmful!", even if one over 2002 deceased Computerpioniere nothing Bad say should...
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
11/04/17  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.452 Views

Themeninformationen

this Topic has 3 subscriber:

p.specht (1x)
H.Brill (1x)
FLINN (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