QuickList.PopFirst
------------------

Pops the first value from a list.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [List](component_List.md) | [5.2](newinversion52.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "QuickList.PopFirst"; ListRef ) 

**MBS**( **"QuickList.PopFirst";** /\* Pops the first value from a list. \*/  
**$ListRef**) /\* The reference to the list returned from [QuickList.New](QuickListNew.md) function.e.g. $List \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ListRef | The reference to the list returned from [QuickList.New](QuickListNew.md) function. | $List |

### Result

Returns value or error.

### Description

Pops the first value from a list.  
Please note that [QuickList.Pop](QuickListPop.md) is more efficient than QuickList.PopFirst.  
### Examples

Push and pop first:

 Set Variable \[$list ; Value:MBS ( "[QuickList.New](QuickListNew.md)" )\]  
Set Variable \[$r ; Value:MBS ( "[QuickList.Push](QuickListPush.md)"; $list ; "Hello" )\]  
Set Variable \[$r ; Value:MBS ( "[QuickList.Push](QuickListPush.md)"; $list ; "World" )\]  
Show Custom Dialog \["List"; MBS ( "QuickList.PopFirst"; $list )\]  
Show Custom Dialog \["List"; MBS ( "QuickList.PopFirst"; $list )\]  
Set Variable \[$r ; Value:MBS ( "[QuickList.Release](QuickListRelease.md)"; $list )\]  
### See also

- [QuickList.AddList](QuickListAddList.md)
- [QuickList.GetList](QuickListGetList.md)
- [QuickList.New](QuickListNew.md)
- [QuickList.Pop](QuickListPop.md)
- [QuickList.Push](QuickListPush.md)
- [QuickList.Release](QuickListRelease.md)
- [QuickList.SetList](QuickListSetList.md)
- [QuickList.SubList](QuickListSubList.md)

This function checks for a license.

Created 2nd August 2015 , last changed 14th December 2023

  
[QuickList.Pop](QuickListPop.md) - [QuickList.Push](QuickListPush.md)

[HTML Version](QuickListPopFirst.shtml)