10 years later... updates for modern Nim.

FossilOrigin-Name: 7361ae25595c1916e9701a25033b684e3cd089d8abb71ead3803a59e36189f63
This commit is contained in:
Mahlon E. Smith 2025-04-03 18:27:46 +00:00
parent ae7b77df4c
commit 9aa2912286
23 changed files with 640 additions and 371 deletions

View file

@ -0,0 +1,15 @@
# vim: set et sta sw=4 ts=4 :
import tnetstring
let tnet_array = newTNetstringArray()
for i in 1 .. 10:
let tnet_obj = newTNetstringInt( i )
tnet_array.add( tnet_obj )
tnet_array[ 6 ] = newTNetstringString( "yep" )
assert tnet_array.len == 10
assert tnet_array[ 4 ].num == 5
assert tnet_array[ 6 ].str == "yep"