Well, v4 is finally out, and you all have a big job ahead of you to digest all of the new features (18 pages of release notes!).

Here's a few of my favorite new features. There are many, many more, but this is just a taste.


String formatting
-----------------
String formatting is truly world class now. Check out these sections of the Interpreter chapter:

- String Literals
- String Interpolation
- Heredoc Strings
- String Format Operator


Variable fun
------------
You can now declare 4D process/interprocess variables on the fly, even in a compiled database! In conjunction with the 'execute in 4d' command, this will eliminate the need to create wrapper methods to implement missing commands.

You can now add an element to an array and address it at the same time like this:

array longint($longs; 0)
$longs{} := 7
$longs{} := 13

It doesn't get much easier.


Collections
-----------
You can now declare an array within a collection directly without having to create a separate array and then assign it, like this:

array longint($myCollection{"ids"}; 0)

You can also make collection items that don't yet exist the target of commands like SELECTION TO ARRAY, like this:

selection to array([companies]id; $comp{"ids"}; [companies]name; $comp {"names"})


Have fun!

Regards,

   Aparajita
   Victory-Heart Productions
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoylibrary.com

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to