Home > Delphi Error > Delphi Error Ordinal Type Required

Delphi Error Ordinal Type Required


Lo que creo que ocurre es que la línea de código que has puesto es la que se "resalta" en el editor, pero, el error sucede una línea antes... Kudos to @Daniel, @The_Fox, and @afrazier for most of the components of this answer. En fin... share|improve this answer edited Jan 25 '13 at 5:18 answered Jan 25 '13 at 5:11 RRUZ 113k11253398 2 you would think by xe2 version, they would of added something.. –Glen http://completeprogrammer.net/delphi-error/delphi-error-array-type-required.html

Tambin dinos por favor la versin de Delphi que ests utilizando. Será que há possibilidade de cirar alguma função que retorne os mesmos valores (B, T, E, L, A) ??????? (não gostaria de perder a referência para fins do melhor entendimento do Encontrar Todos los Mensajes de dec #3 05-11-2007 Cecil Miembro Registrado: May 2007 Posts: 97 Ya lo he solucionado, ha sido asi: Cdigo Delphi [-]if DsAux.State in [TDataSetState(dsEdit)] Send feedback! http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/cm_ordinal_type_xml.html

Delphi Case Statement

All Rights Reserved. Mas o codigo acima ira te ajudar com o case._________________Wesley Bento Moreira Voltar ao Topo Mostrar os tópicos anteriores: Todas as mensagens1 Dia7 Dias2 Semanas1 Mês3 Meses6 Meses1 AnoAntigas primeiroRecentes primeiro Retrieved from "http://docwiki.embarcadero.com/RADStudio/Seattle/e/index.php?title=E2001_Ordinal_type_required_(Delphi)&oldid=237546" Category: RAD Studio Reference Views Page Discussion View source History Personal tools Create account Log in Search RAD Studio Seattle Seattle Examples and Samples Seattle Libraries Main

bullzeye9508-03-2008, 04:45 AMIn Delphi, cases don't accept strings (or, in this case, TCaptions). Si sin l, el compilador te arrojaba el error mencionado, seguramente es porque no se trataba de la constante dsEdit que todos conocemos, sino alguna otra cosa que fue nombrada con more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Un saludo y gracias. __________________ "There is nothing either good or bad, but thinking makes it so" William Shakespeare.

Hot Network Questions Why do some softwares have memory leak? Delphi Indexstr But exist another options like build a function which returns a Integer (hash) based on a string using generics and anonymous methods ( A generic case for strings) using a function Also: The only two reasons this would occur: Form1.ComboBox3.Text is an integer (it may be in the if its infact a pointer), or Form1.RichEdit1.SelAttributes.Color is a string. argh.

PDA View Full Version : Ordinal Type required and Incompatable Types! Please help, thanks ;) Rep++ if you do help ;) R0b0t108-03-2008, 04:25 AMI think the color may be a string, have you checked the Codehints? Viktor Mihalevskiy Знаток (341) 7 лет назад Замени на это чтоб не заморачиватьprocedure TForm1.Button1Click(Sender: TObject);varparam: string;beginparam := edit1.Text;if('aa' = param)then edit1.Text := 'ok';if('bb' = param)then edit1.Text := 'cool';end; ARkhiPROGRAMerЗнаток (298) 2 Join them; it only takes a minute: Sign up Using Case Statement with String up vote 21 down vote favorite 5 Say i have a string 'SomeName' and wanted the values

Delphi Indexstr

Started by codegirl, 26 Mar 2013 vb.net, combobox, text, file and 1 more... 1 2 Hot 13 replies 2440 views codegirl 30 Mar 2013 Language Forums → Visual Basic Omg, so I have to give each variable a number and then do it? Delphi Case Statement El código que muestras parece "bien formado", empero, tú mismo dices que el problema ocurre: Cita: (...) cuando necesito pasar como parámetro un array sea del tipo que sea (...) Pero, It works in SCAR so there must be a difference.

Divisibility Proof more hot questions question feed lang-pascal about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture click site I have always done case this way, well i pascal anyways.Thanks 0 Back to top #2 WingedPanther73 WingedPanther73 A spammer's worst nightmare Moderator 17757 posts Location:Upstate, South Carolina Programming Language:C, C++, Contradiction between law of conservation of energy and law of conservation of momentum? Can this bedone?

The low and high bounds of a subrange type must be constant expressions of ordinal type. não aceita realizar case de variáveis do tipo char, mas somente de variáveis derivadas de valores do type integer ou derivados (ordinal) var iCnt : Integer begin Case iCnt of 0 Encontrar Todos los Mensajes de Al Gonzlez #8 05-11-2007 Cecil Miembro Registrado: May 2007 Posts: 97 Errr... http://completeprogrammer.net/delphi-error/delphi-error-record-object-or-class-type-required.html De ser as, las consecuencias pueden ser inesperadas.

The element type of a set must be an ordinal type. share|improve this answer answered Jan 25 '13 at 7:00 Daniel 782511 10 Or just use the standard AnsiIndexStr function. –The_Fox Jan 25 '13 at 7:54 11 Or just IndexStr Movie about a guy who uses a notebook to relive and fix horrible accidents that he and his friends caused Using a relay for retro clicky sound - how do I

The index type of an array must be an ordinal type - type TByteSet is a set, not an ordinal.

asked 3 years ago viewed 39079 times active 6 months ago Blog International salaries at Stack Overflow Related 3Is possible to declare string type with restricted length that doesn't start from me vais a querer matar cuando os lo cuente... Al. Hide Comments · Unlock · Lock 12 Feb moonvik Java...

PHP JAVA .NET HTML, Javascript y otros ASM y Microcontroladores Python Bases de datos Firebird e Interbase So you cannot use strings directly. Daniel08-02-2008, 12:21 PMHere's the procedure: procedure TForm1.ComboBox3Change(Sender: TObject); begin case (Form1.ComboBox3.Text) of //The ordinal error. 'Black': Form1.RichEdit1.SelAttributes.Color:=clBlack; //The Incompatable types error. 'Grey': Form1.RichEdit1.SelAttributes.Color:=clGray; 'White': Form1.RichEdit1.SelAttributes.Color:=clWhite; 'Cyan': Form1.RichEdit1.SelAttributes.Color:=clSkyBlue; 'Blue': Form1.RichEdit1.SelAttributes.Color:=clBlue; 'Navy': Form1.RichEdit1.SelAttributes.Color:=clNavy; More about the author The first argument to the standard procedures Inc and Dec must be a variable of either ordinal or pointer type.

Register with Facebook Register with Twitter Android Cheats More Codecall → Language Forums → Other Languages → Pascal and Delphi Javascript Disabled Detected You currently have javascript disabled. caseListn: statementn;endwhere selectorExpression is any expression of an ordinal type (string types are invalid) and each caseList is one of the following: Источник: Delphi HELP Алексей УдаловГуру (2912) 7 лет назад The selection expression of a case statement must be of ordinal type. Herramientas Buscar en Tema Desplegado #1 05-11-2007 Cecil Miembro Registrado: May 2007 Posts: 97 Ordinal Type Required Hola a todos, queria exponeros un problema que tengo: De repente,