Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/04.guides/04.cookbooks/34.Types_lucee/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ id: types_lucee
---
## Types in lucee ##

This document explains types in Lucee. Lucee is still an untyped language. Types are only a check put on top of the language. The language is not based on types, however there are different places where types come into Lucee. This is explained with some simple examples below:
This document explains types in Lucee that is still an untyped language. Types are only a check put on top of the language. The language is not based on types, however there are different places where types come into Lucee. This is explained with some simple examples below:

#### Example 1 : Function Argument and Return Value ####

For functions, the return value is returned with the specific type that was defined in that function.

```luceescript
```lucee

// function1.cfm

Expand All @@ -37,7 +37,7 @@ For functions, the return value is returned with the specific type that was defi

#### Example 2 : CFParam ####

```luceescript
```lucee

// param.cfm

Expand All @@ -51,7 +51,7 @@ dump(label:"Age:", var:url.age);

#### Example 3 : Queries ####

```luceescript
```lucee

//queries.cfm

Expand Down Expand Up @@ -82,7 +82,7 @@ query=queryNew(["name","age"],["string","numeric"]);

#### Example 4 : ArrayNew ####

```luceescript
```lucee

// array.cfm

Expand All @@ -100,7 +100,7 @@ names=arrayNew(type:"string");

#### Example 5 : Literals ####

```luceescript
```lucee

// literals.cfm

Expand All @@ -119,7 +119,7 @@ if(sct.bol)dump("is true");

#### Example 6 : Converting ####

```luceescript
```lucee

//converting.cfm

Expand All @@ -146,7 +146,7 @@ if(sct.bol)dump("is true");
* We have loaded a Java library and string builder. We pass a string into a constructor and execute this. We see that the string builder contains that value. We refer to this ``string builder`` method in the Java Doc. The method is called ``substring``. This substring takes an int as its argument. For example, we pass a string value instead of an int value ``sb.substring("5")``. Lucee returns a substring properly.
* Two constructors are available for string builder. There are ``StringBuilder(int), StringBuilder(string)``.

```luceescript
```lucee

//index.cfm

Expand All @@ -156,7 +156,7 @@ loop query=dir {
}
```

```luceescript
```lucee

// test.cfc

Expand Down