spielwiese
Last change
on this file was
ba3e3e,
checked in by Hans Schoenemann <hannes@…>, 11 months ago
|
fix: =system("sh","rm -f... on mac
|
-
Property mode set to
100644
|
File size:
674 bytes
|
Line | |
---|
1 | // create an empty date base: |
---|
2 | system("sh","rm -f example.dir example.pag"); |
---|
3 | system("sh","touch example.dir example.pag"); |
---|
4 | link dbmLink="DBM:rw example"; |
---|
5 | write(dbmLink,"1","abc"); |
---|
6 | write(dbmLink,"3","XYZ"); |
---|
7 | write(dbmLink,"2","ABCc"); |
---|
8 | dbmLink; |
---|
9 | close(dbmLink); |
---|
10 | // read all keys (till empty string): |
---|
11 | read(dbmLink); |
---|
12 | read(dbmLink); |
---|
13 | read(dbmLink); |
---|
14 | read(dbmLink); |
---|
15 | // read data corresponding to key "1" |
---|
16 | read(dbmLink,"1"); |
---|
17 | // read all data: |
---|
18 | read(dbmLink,read(dbmLink)); |
---|
19 | read(dbmLink,read(dbmLink)); |
---|
20 | read(dbmLink,read(dbmLink)); |
---|
21 | // close |
---|
22 | close(dbmLink); |
---|
23 | int dummy=system("sh","rm -f example.dir example.pag"); |
---|
24 | LIB "tst.lib";tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.