$scid » History » Version 4
Per Amundsen, 02/23/2023 07:34 PM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | *$scid(N)* |
||
| 4 | |||
| 5 | 3 | Per Amundsen | Returns the matching [[$cid|connection id]]. |
| 6 | 1 | Per Amundsen | |
| 7 | 4 | Per Amundsen | _See also [[/scon]], [[/scid]], [[$scon]]._ |
| 8 | |||
| 9 | 1 | Per Amundsen | *Parameters* |
| 10 | |||
| 11 | 4 | Per Amundsen | table(ktable). |
| 12 | |*Parameter*|*Description*| |
||
| 13 | | N | If N = 0, number of connection id's, otherwise the matching [[$cid<notextile>|</notextile>connection id]]. | |
||
| 14 | 1 | Per Amundsen | |
| 15 | *Properties* |
||
| 16 | |||
| 17 | 4 | Per Amundsen | table(ktable). |
| 18 | |*Property*|*Description*| |
||
| 19 | | .id | If you specify a property which is an identifier, it returns the value of that identifier for that connection. This also works for custom identifiers. | |
||
| 20 | 1 | Per Amundsen | |
| 21 | *Example* |
||
| 22 | |||
| 23 | <pre> |
||
| 24 | ; Print number of connection id's. |
||
| 25 | //echo -ag $scid(0) |
||
| 26 | |||
| 27 | ; Print the first connection id. |
||
| 28 | 2 | Per Amundsen | //echo -ag $scid($scon(1)) |
| 29 | 1 | Per Amundsen | |
| 30 | ; Evaluate $me on the first connection id. |
||
| 31 | 2 | Per Amundsen | //echo -ag $scid($scon(1)).me |
| 32 | 1 | Per Amundsen | </pre> |