1.3 What's new in 4.0?

Euphoria v4.0 is a very large jump in functionality from the previous stable release, 3.1.1.

Euphoria has a brand new standard library consisting of over 800 public members. Too numerous to list here, please see the reference section of this manual.

1.3.1 General Changes

  • New manual and documentation system
  • New logo
  • Switched to using our own ticket system
  • Switched to using our own self hosted Mercurial SCM system

1.3.2 Executable name changes

Old New Description
ex and exwc eui Euphoria Interpreter
ec and ecw euc Euphoria to C Translator
bind.bat and bind eubind Euphoria Binder
shroud.bat and shroud eushrouder Euphoria Shrouder

1.3.3 Language Enhancements

  • Conditional compilation using the ifdef statement.
  • Raw strings, which can include multilined text.
  • Multiline comments using the C-styled comments /* .. */, which can be nested.
  • Binary, Octal and alternative Decimal and Hexadecimal number format - 0b10 (2), 0t10 (8), 0d10 (10), 0x10 (16)
  • Hexadecimal string formats. Use \x to embed any byte value into a standard string, or create an entire hexadecimal byte string using x" ... "
  • Function results can now be ignored.
  • Optional list terminator. The final item in a list can be the dollar symbol ($). This is just a place holder for the end-of-list, making it easier to add and delete items from the source code without having to adjust the commas.
  • Enumerated values/types (enum, enum type)
  • Built-in eu: namespace
  • Declare variable anywhere, not just at the top of a method.
  • Scoped variables (declared inside an if for example)
  • Assign on declaration. You can now declare a variable and assign it an initial value on the same statement.
  • The object() built-in function can now be used to safely test if a variable has been initialized or not.
  • Forward referencing. You no longer need to lexically declare a routine before using it.
  • Additional loop constructs ...
  • Additional conditional constructs
    • switch statement with or without fallthru
    • You can label an if or switch
    • break keyword allows exiting from if / switch blocks
  • Default/optional parameters for routines
  • Additional scope modifiers
  • Built in sockets
  • Built in Regular Expressions
  • Resource clean up that can be triggered manually, or when an object's reference count goes to zero
  • Automatic inlining of small routines, with / without inline
  • Built in, optimized sequence operations (remove, insert, splice, replace, head, tail)
  • Built in peek and poke 2 byte values, 1 byte signed values, peek null terminated strings, peek, peek2, peek_string, poke and poke2
  • Fine grained control over which, if any, warnings will be generated by Euphoria, with / without warning.

1.3.4 Tool Additions / Enhancements