How to replace $lb elements with empty elements

Beginner, Caché

I have a list

set list=$lb(1,$c(0),2)

How do I replace $c(0) with an empty element?

My list should look like this:

set list=$lb(1,,2)

I tried using $list but it either replaces the element with an empty string:

set $list(list,2)=""
zw list

Resulting in:

list=$lb(1,"",2)

Or removes the element altogether:

set $list(list,2,2)=""
zw list

Resulting in:

list=$lb(1,2)
  • + 2
  • 0
  • 191
  • 1
  • 1

Answers

set $list(list,2,2)=$LB()

?

That's it,  Alex is right

USER>set list=$lb(7,8 ,9)
USER>zzdump list
 
0000: 03 04 07 03 04 08 03 04 09                              .........
USER>set $li(list,2,2)=$lb()
USER>zzdump list
 
0000: 03 04 07 01 03 04 09                                    .......
USER>zw list
list=$lb(7,,9)