English
Forum

type the Parameters Check

 

KHR
Hello

how can I with of/ one by parameters übergebenen variables whom type check?

I Have there ne procedure in the sense The could numerisch or by String bedient go
 
Gruß
Karl-Heinz
WIN XP home/Pro / XPROFAN 11 / P2CPP
ATMEL + BASCOM Fan
01/02/09  
 




Michael
Wodrich
PType$()

Best wishes
Michael Wodrich

Edit:
leaves itself with %PCount naturally too for several Parameter strain.

important: to or inside the PType$-clinging can no others functions called go (Auswirkungen on The Parameter-Speicherung).
there %PCount a Systemvariable is, works the naturally integrally lovely.
 
Programmieren, das spannendste Detektivspiel der Welt.
01/02/09  
 




Michael
Wodrich

CompileMarkSeparation
Proc Zahl_oder_String

    Declare Ergebnis$, Typ$
    Typ$ = PType$(1)

    If Typ$ = $

        Parameters ein_String$
        Ergebnis$ = ein_String$

    ElseIf Typ$ = &

        Parameters eine_Zahl&
        Ergebnis$ = Str$(eine_Zahl&)

    EndIf

    MessageBox(Ich habe +iif(Typ$=&,die Zahl,den String)+
    + Ergebnis$ +
    erhalten.,,0)
    Return Ergebnis$

EndProc

cls
print Zahl_oder_String(34)
print Zahl_oder_String(Okay)
WaitKey
End

Best wishes
Michael Wodrich

Edit:
If one any Types abfragt (see manuals) minimizes itself naturally The Number of unliebsamen Überraschungen.
 
Programmieren, das spannendste Detektivspiel der Welt.
01/02/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

851 Views

Untitledvor 0 min.
RudiB.10/21/21
Julian Schmidt10/15/11

Themeninformationen

this Topic has 2 subscriber:

Michael Wodrich (2x)
KHR (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