AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Fragen zu Delphi Delphi Überprüfen, ob ein String auch ein anderer Datentyp sein kan
Thema durchsuchen
Ansicht
Themen-Optionen

Überprüfen, ob ein String auch ein anderer Datentyp sein kan

Ein Thema von xZise · begonnen am 19. Mai 2006 · letzter Beitrag vom 20. Mai 2006
Antwort Antwort
Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.779 Beiträge
 
Delphi 10.4 Sydney
 
#1

Re: Überprüfen, ob ein String auch ein anderer Datentyp sein

  Alt 19. Mai 2006, 18:56
Vielleicht ist val das was Du suchst?

Aus der Hilfe:
Zitat:

Converts a string to a numeric representation.

Unit

System

Category

string handling routines

procedure Val(S; var V; var Code: Integer);

Description

Val converts the string value S to its numeric representation, as if it were read from a text file with Read.

S is a string-type expression; it must be a sequence of characters that form a signed real number.

V is an integer-type or real-type variable. If V is an integer-type variable, S must form a whole number.

Code is a variable of type Integer.

If the string is invalid, the index of the offending character is stored in Code; otherwise, Code is set to zero. For a null-terminated string, the error position returned in Code is one larger than the actual zero-based index of the character in error.

Val performs range checking differently depending upon the setting of the $R compiler directive and the type of the parameter V.

Setting Result

{$R+} An out-of-range value always generates a run-time error.
{$R-} The values for out-of-range vary depending upon the data type of V.
Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:12 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz