5. Examples#

Example 1:

Let’s say we want to create the list:

1. 3. 5. 10. 15. 15. 15. 20. 20. 25. 25. 26. 27. 28.

Which is such that the step is: 2. from 1. to 5. 5. from 5. to 25. 1. from 25. to 28.

We can write:

lr = DEFI_LIST_REEL (DEBUT = 1. ,

INTERVALLE =( _F (JUSQU_A = 5., NOMBRE = 2,), _F (JUSQU_A = 25., NOMBRE = 4,), _F (JUSQU_A = 28., PAS = 1.,),), )

Example 2:

To create the list: 1. 3. 12. 13.

We can write:

lr = DEFI_LIST_REEL (VALE = (1., 3., 3., 12., 13.),)

Example 3:

You can build a Python list this way.
lr = DEFI_LIST_REEL (VALE = [:ref:`sqrt(i) for i in range(5) <sqrt(i) for i in range(5)>`],)