definir variable

definir variable

Postby morin0510 » Fri Jun 09, 2023 3:08 pm

buenas a ver si me podeis ayudar quiero definir esta variable

local cText := " TButton():New( 250, 240," Imprimir", oDlg, {|| imOctubre()}, 60, 20,,, .F., .T., .F.,, .F.,,, .F. )"

Build: 000004 - 20230609170656150
Harbour 3.2.0dev (Rev. 17516)
Copyright (c) 1999-2012, http://harbour-project.org/

1 error

No code generated.

C:\FIVEUI\SOURCE\prueba.prg(1055) Error E0030 Syntax error "syntax error at 'IMPRIMIR'"

saludos
morin0510
 
Posts: 14
Joined: Mon Jul 06, 2015 7:11 pm

Re: definir variable

Postby JoseAlvarez » Fri Jun 09, 2023 6:20 pm

Saludos estimado.

La palabra IMPRIMIR debes colocarla dentro de comillas simples -> 'Imprimir'
"Los errores en programación, siempre están entre la silla y el teclado..."

Fwh 19.06 32 bits + Harbour 3.2 + Borland 7.4 + MariaDB + TDolphin

Carora, Estado Lara, Venezuela.
User avatar
JoseAlvarez
 
Posts: 791
Joined: Sun Nov 09, 2014 5:01 pm

Re: definir variable

Postby karinha » Fri Jun 09, 2023 6:37 pm

Code: Select all  Expand view

#Include "FiveWin.ch"

FUNCTION Main()

   LOCAL cText := [ TButton():New( 250, 240," Imprimir", oDlg, {|| imOctubre()}, 60, 20,,, .F., .T., .F.,, .F.,,, .F. ) ]

   ? cText

RETURN NIL
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7778
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: definir variable

Postby morin0510 » Fri Jun 09, 2023 8:07 pm

muchas gracias efectivamente es como tu dices comillas simples y no da error y funciona
gracias un saludo
morin0510
 
Posts: 14
Joined: Mon Jul 06, 2015 7:11 pm

Re: definir variable

Postby morin0510 » Fri Jun 09, 2023 8:10 pm

tambien funciona con [ ] muchas gracias a los dos
saludos
morin0510
 
Posts: 14
Joined: Mon Jul 06, 2015 7:11 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 25 guests