# AddStdLibraryBinder
{: .no_toc }

Registers the standard-library binder so compiled expressions can call the common runtime functions.

Syntax: *service*.**AddStdLibraryBinder**

*service*
: *required* An object expression that evaluates to a **TbExpressionService** object.

After **AddStdLibraryBinder** has been called, expressions compiled by *service* can reference any procedure or property in the standard runtime library --- math functions like [**Sqr**](/tB/Modules/Math/Sqr.md), [**Sin**](/tB/Modules/Math/Sin.md), and [**Round**](/tB/Modules/Math/Round.md); string functions like [**Len**](/tB/Modules/Strings/Len.md), [**Mid**](/tB/Modules/Strings/Mid.md), and [**Format**](/tB/Modules/Strings/Format.md); conversion functions like [**CStr**](/tB/Modules/Conversion/CStr.md) and [**CInt**](/tB/Modules/Conversion/CInt.md); and so on.

A new **TbExpressionService** has no binders registered. Without at least one binder, compiled expressions can do little more than evaluate literal arithmetic --- any reference to a named symbol fails compilation with a run-time error.

### Example

```tb check_build
Dim Service As TbExpressionService = New TbExpressionService
Service.AddStdLibraryBinder()

Debug.Print Service.Compile("Sqr(2) + Sqr(3)").Evaluate()    ' 3.14...
Debug.Print Service.Compile("UCase(""hello"")").Evaluate()   ' HELLO
```

### See Also

- [Compile](/tB/Modules/TbExpressionService/Compile.md) method
- [AddCustomBinderObject](/tB/Modules/TbExpressionService/AddCustomBinderObject.md) method
- [AddCustomBinder](/tB/Modules/TbExpressionService/AddCustomBinder.md) method
