[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
complex data structure in elisp
From: |
Dirk80 |
Subject: |
complex data structure in elisp |
Date: |
Tue, 25 Aug 2009 07:22:51 -0700 (PDT) |
Hi,
sorry for this beginner question. But I'm very interested how you would
represent the data structure of my example in elisp.
Here my example:
I want to implement a vocabulary trainer in elisp.
I have units. A unit is consisting of lessons and lessons are consistng of
sublessons. One sublesson is consisting of vocabularies. A vocabulary is
consisting of an audio-file, picture file and a text.
Here how I would do it in C:
struct Vocabulary
{
char audio_file[255];
char picture_file[255];
char text[1000];
};
struct SubLesson
{
int nb_vocabularies;
struct Vocabulary[1000];
};
struct Lesson
{
int nb_sub_lessons;
struct SubLesson sub_lessons[10];
};
struct Unit
{
int nb_lessons;
struct Lesson lessons[10];
};
struct UnitList
{
int nb_units;
struct Unit units[8];
};
e.g. Unit 4, Lesson 7, Sublesson 2, Vocabulary 1, audio-file
struct UnitList unit_list;
unit_list.units[3].lessons[6].sub_lessons[1].vocabulary[0].audio_file =
"hello.wav";
Now to the details of using. Because I think this is important in elisp
because of performance.
This "UnitList" shall be initialised with content. During runtime it will
never be changed.
Thank you a lot in advance for your help
Dirk
--
View this message in context:
http://www.nabble.com/complex-data-structure-in-elisp-tp25135295p25135295.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
- complex data structure in elisp,
Dirk80 <=