Navigation:  Reference > Source Code Editor Overview >

TAS Professional code tips

Print this Topic Previous pageReturn to chapter overviewNext page

In this short explanation we will try to explain sone of the undocumented features in the code editor/Compiler so lets get started.

 

In Earlier versions of TAS Version 4 and 5 you could truncate a line by using the '|' character In tas 6 and 7 we had to change this to a '||'

Example of using '||'

field1 = field2

field3 = field4

or

field1 = field2 || field3 = field4

will do the same thing.

 

Example of Set_Object

set_object 'button1' property 'caption' value 'My Button Caption'

or

'@button1.caption' = 'My Button Caption'

 

Long Message using the +\

msg "The maximum number of columns has been chosen.  "+\

           "Do not choose to print the Account Codes and "+\

           "Calculated Percentages.  There is not enough room on this 132 column report "+\

           "for all the options you can choose here.  You may choose one or the other, however."

 

You can also control CRLF in a message or Ask

ask "******************** CAUTION ********************"+crlf(2)+\

       "This program will clear all 'yearly' data fields.  "+\

       "Please refer to your documentation for more details.  "+\

       "Also, be sure you have obtained back-ups for all data. "+crlf(2)+\

       "More instructions follow// you may exit at any time.  "+\

       "Do you wish to continue?"

 

Breaking long command lines with the \ Char

scan @dict_hndl key dict_overlay while dict_buff_name = loc_buff_name start loc_buff_name,0! for (dict_type<>'V' .and. dict_type<>'O' .a. dict_type<> 'M') .a. dict_size<>0 scope N 1490

OR

scan @dict_hndl key dict_overlay while dict_buff_name = loc_buff_name \

       start loc_buff_name,0! for (dict_type<>'V' .and. dict_type<>'O' .a. dict_type<> 'M') .a. dict_size<>0 \

      scope N 1490

 

 

 

 


Page url: http://www.cassoftware.com/tas/manual/tas_professional_code_tips.htm