AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

String->Smallint

Ein Thema von LoL · begonnen am 1. Dez 2004 · letzter Beitrag vom 1. Dez 2004
Antwort Antwort
LoL
(Gast)

n/a Beiträge
 
#1

String->Smallint

  Alt 1. Dez 2004, 08:54
moin,

kann man einen String direkt in SmallInt convertieren?
(StrToSmallint? )
  Mit Zitat antworten Zitat
Benutzerbild von Sharky
Sharky

Registriert seit: 29. Mai 2002
Ort: Frankfurt
8.251 Beiträge
 
Delphi 2006 Professional
 
#2

Re: String->Smallint

  Alt 1. Dez 2004, 08:56
Hai,

das sollte doch auch mit Delphi-Referenz durchsuchenStrToInt gehen.
Stephan B.
"Lasst den Gänsen ihre Füßchen"
  Mit Zitat antworten Zitat
LoL
(Gast)

n/a Beiträge
 
#3

Re: String->Smallint

  Alt 1. Dez 2004, 08:58
mein probelm ist ich will von Int was von Typ smallint abziehen und das geht nit
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#4

Re: String->Smallint

  Alt 1. Dez 2004, 09:01
Zitat von LoL:
mein probelm ist ich will von Int was von Typ smallint abziehen und das geht nit
Geht:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  i: Integer;
  si: Smallint;
begin
  i := 1259;
  si := 10;
  ShowMessage(IntToStr(i-si));
end;
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Sprint
Sprint

Registriert seit: 18. Aug 2004
Ort: Edewecht
712 Beiträge
 
Delphi 5 Professional
 
#5

Re: String->Smallint

  Alt 1. Dez 2004, 09:02
Zitat von LoL:
mein probelm ist ich will von Int was von Typ smallint abziehen und das geht nit
Warum sollte das nicht gehen?

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  LI: Integer;
  SI: Smallint;
begin

  LI := 6;
  SI := 12;

  SI := SI - LI;

  ShowMessage(IntToStr(SI));

  LI := LI + SI;

  ShowMessage(IntToStr(LI));

end;
Ciao, Sprint.

"I don't know what I am doing, but I am sure I am having fun!"
  Mit Zitat antworten Zitat
LoL
(Gast)

n/a Beiträge
 
#6

Re: String->Smallint

  Alt 1. Dez 2004, 09:04
Warum kommt dann das bei mir

[Error] main.pas(525): Incompatible types: 'Integer' and 'Smallint'
  Mit Zitat antworten Zitat
Benutzerbild von Sharky
Sharky

Registriert seit: 29. Mai 2002
Ort: Frankfurt
8.251 Beiträge
 
Delphi 2006 Professional
 
#7

Re: String->Smallint

  Alt 1. Dez 2004, 09:06
Zeige doch mal etwas Code.
Stephan B.
"Lasst den Gänsen ihre Füßchen"
  Mit Zitat antworten Zitat
LoL
(Gast)

n/a Beiträge
 
#8

Re: String->Smallint

  Alt 1. Dez 2004, 09:08
hmm... komisch
ich hab mal delphi neu gestartet jetzt gehts
Sorry für die komische Frage
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

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 17:45 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz