Is there any way to set a value to a string variable using multiple lines? For example instead of:
Something like this: (This can be done in Visual FoxPro, everything between text/endtext is treated as a string literal)
B4X:
Dim sql As String
sql = "CREATE TABLE IF NOT EXISTS stock('guid_stock' char(32) PRIMARY KEY NOT NULL, 'guid_arti' char(32) NOT NULL, 'idcaja' char(10) NOT NULL, 'serial' decimal(8,0) NOT NULL DEFAULT '0', 'serialprint' int(1) DEFAULT '0', 'tara' decimal(5,2) NOT NULL DEFAULT '0.00', 'bruto' decimal(5,2) NOT NULL DEFAULT '0.00', 'neto' decimal(5,2) NOT NULL DEFAULT '0.00', 'operador' char(2) NOT NULL DEFAULT '00', 'fecha' datetime, 'codigo' char(4) NOT NULL DEFAULT '0000', 'codigo1' char(2) NOT NULL DEFAULT '00', 'codigo2' char(1) NOT NULL DEFAULT '0', 'codigo3' char(1) NOT NULL DEFAULT '0', 'codigo4' char(1) NOT NULL DEFAULT '0', 'clave' char(2) NOT NULL DEFAULT '00', 'titulo' char(4) NOT NULL DEFAULT '00/0', 'tipo1' char(1) NOT NULL DEFAULT '0', 'tipo2' char(1) NOT NULL DEFAULT '0', 'tipo3' char(1) NOT NULL DEFAULT '0', 'nombre' varchar(45) NOT NULL DEFAULT '-', 'descrip' varchar(45) NOT NULL DEFAULT '-', 'lote' decimal(3,0) NOT NULL DEFAULT '0', 'turno' char(10) NOT NULL DEFAULT '0000000000', 'tfecha' char(8) NOT NULL DEFAULT '00000000', 'tturno' char(2) NOT NULL DEFAULT '00', 'estado' int(10), 'pedido' char(12) NOT NULL DEFAULT '00000000-000', 'romaneo' char(8) NOT NULL DEFAULT '00000000', 'origen' int(10) DEFAULT '0', 'imps' int(10) DEFAULT '0', 'etiquetas' int(10) DEFAULT '0')"
Something like this: (This can be done in Visual FoxPro, everything between text/endtext is treated as a string literal)
B4X:
Dim sql As String
text to sql
CREATE TABLE IF NOT EXISTS stock(
'guid_stock' char(32) PRIMARY KEY NOT NULL,
'guid_arti' char(32) NOT NULL,
'idcaja' char(10) NOT NULL,
'serial' decimal(8,0) NOT NULL DEFAULT '0',
'serialprint' int(1) DEFAULT '0',
'tara' decimal(5,2) NOT NULL DEFAULT '0.00',
'bruto' decimal(5,2) NOT NULL DEFAULT '0.00',
'neto' decimal(5,2) NOT NULL DEFAULT '0.00',
'operador' char(2) NOT NULL DEFAULT '00',
'fecha' datetime, 'codigo' char(4) NOT NULL DEFAULT '0000',
'codigo1' char(2) NOT NULL DEFAULT '00',
'codigo2' char(1) NOT NULL DEFAULT '0',
'codigo3' char(1) NOT NULL DEFAULT '0',
'codigo4' char(1) NOT NULL DEFAULT '0',
'clave' char(2) NOT NULL DEFAULT '00',
'titulo' char(4) NOT NULL DEFAULT '00/0',
'tipo1' char(1) NOT NULL DEFAULT '0',
'tipo2' char(1) NOT NULL DEFAULT '0',
'tipo3' char(1) NOT NULL DEFAULT '0',
'nombre' varchar(45) NOT NULL DEFAULT '-',
'descrip' varchar(45) NOT NULL DEFAULT '-',
'lote' decimal(3,0) NOT NULL DEFAULT '0',
'turno' char(10) NOT NULL DEFAULT '0000000000',
'tfecha' char(8) NOT NULL DEFAULT '00000000',
'tturno' char(2) NOT NULL DEFAULT '00',
'estado' int(10), 'pedido' char(12) NOT NULL DEFAULT '00000000-000',
'romaneo' char(8) NOT NULL DEFAULT '00000000',
'origen' int(10) DEFAULT '0',
'imps' int(10) DEFAULT '0',
'etiquetas' int(10) DEFAULT '0')
endtext