Built in function library

  1. Most of my personal issues with ROS scripting are when it comes to string parsing and string manipulation. Gives how ROS scripting is used, these are some of the most used functions, and currently they lack of lot of utility functions.

:strleft - return a number of characters of the string (from the left)
:strright - return a number of characters of the string (from the right)
:strreplace - replace some characters in string

These would be super useful to avoid having to deal with "find and :pick all the time for simple string manipulation. And replace is just missing completely.

  1. Next, the loops in ROS scripting are completely missing functionality to affect their code-flow.

:break - break out of a :for and :foreach, etc. loops
:continue - the usual concept of :continue in loops

  1. Time and date manipulation. This is just not handled at all. For example, this script shows how to nicely deal with time/date increases: http://forum.mikrotik.com/t/dates-manipulation-module/113640/1 Having the ability to natively do time/date manipulation would super useful. Here is an example using the function linked above:
:local targetDate [$addDate date=[/system clock get date] days=3]

I would much prefer a :todate function which would format a string as a date, and allow for easy operations. Something like this working natively would be lovely:

:local targetDate ([/system clock get date] + [:todate "3d"])
  1. Finally, I would really like to get access to why an error occurred in on-error blocks. Here is what I would love:
:do {  
    # things
} on-error e do={
  :put "Failed, reason: $e"
};