Example: /Util/Locale/FormatMBS function console

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/Util/Locale/FormatMBS function console


Required plugins for this example: MBS Util Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/Locale/FormatMBS function console

This example is the version from Thu, 12th Dec 2012.

Project "FormatMBS function console.xojo_binary_project"
Class App Inherits ConsoleApplication
EventHandler Function Run(args() as String) As Integer // test normal mode test "%f", 1.234 // default locale test "%f", 1.234, "de_DE" // German test "%f", 1.234, "en_US" // US English test "%f", 1.234, "fr_FR" // French test "%f", 1.0 // default locale test "%f", 1.0, "de_DE" // German test "%f", 1.0, "en_US" // US English test "%f", 1.0, "fr_FR" // French // one before comma, 2 after comma test "%1.2f", 1.234 // default locale test "%1.2f", 1.234, "de_DE" // German test "%1.2f", 1.234, "en_US" // US English test "%1.2f", 1.234, "fr_FR" // French // test exceptions test "%f%f", 1.23, "fr_FR" // French test "%f", 1.23, "xxx" // French End EventHandler
Sub Test(format as string, value as Double, locale as string = "") #pragma BreakOnExceptions false try print format+": "+formatMBS(format, value, locale) catch u as UnsupportedFormatException print format+": "+u.message end try End Sub
End Class
End Project

See also:

The items on this page are in the following plugins: MBS Util Plugin.


💬 Ask a question or report a problem