[Gambas-user] Line continuation

MinnesotaJon nicholso at ...2533...
Sat Dec 7 18:27:46 CET 2013


If you are using SHELL, you can assign lines to variables.  If the string
continues on multiple lines, assign the text to string variables, and
concatenate those variables.  
The example below merely shows SHELL accepting a string variable as its
command string:

DIM sRes as String
DIM shellString as String  

  shellString = "cat /proc/meminfo"
  Shell shellString To sRes  

If you use EXEC, the flexibility is more limited, as the command cannot be
contained in a variable, but the following will work:

DIM execString as String
DIM sRes as String
  execString = "/proc/meminfo"
  Exec ["cat", execString] To sRes



--
View this message in context: http://gambas.8142.n7.nabble.com/Line-continuation-tp44561p44582.html
Sent from the gambas-user mailing list archive at Nabble.com.




More information about the User mailing list