Code: Select all
# Filters the strings "." and ".." from a list
function filterDots pList
local tList
put pList into tList
filter tList without "."
filter tList without ".."
return tList
end filterDots
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
# Filters the strings "." and ".." from a list
function filterDots pList
local tList
put pList into tList
filter tList without "."
filter tList without ".."
return tList
end filterDots
Like a lot of the stuff in the Scripting Style Guide, that's another example of GMTA. I started using "lbl" prefixes for non-editable fields a while back, and I find it makes them so much easier to distinguish in scripts and in a control browser.mwieder wrote:I also prepend "lbl" to label field names, "btn", "chk", "rdo" to button names, etc. Not necessary, but it's a holdover from other programming environments and it makes it easier for me to tell at a glance whether my code is acting on a radio button or a checkbox.