Global Village BBS Global Village BBS Logo
[ about ] [ gateway ] [ help ] [ links ]



  The 'fancy doing' - an alternative to boring, non-changing doing-fields
                             Feature description

Note: This document contains texts included in double quotes "". This is
      done to increase the legibility. In the BBS, you must leave these
      double quotes away for the examples to work.

You can add special codes to your doing field which allow you the automatic
insertion of variable values. Every of these codes starts with the escape
sequence "@@". There is always a third character which specifies the sort
of data to insert at that position. If necessary, this character is followed
by a parameter in fixed length.

Description of the possible data insertion sequences:

(1) Description: Number of days since an event took place, OR
                 number of days until an event will take place.
    Format : @@dYYYYMMDD
    Meaning: d ...... data type identifier
             YYYY ... year in four-digit parameter format (any input
                      between 1904 and 2037 will return valid results) 
             MM ..... month in two-digit parameter format (in the range
                      from 01 to 12)
             DD ..... day of the month in two-digit parameter format
                      (in the range from 01 to 31)
    Example: @@d19981224
             Will display the number of days since Christmas Eve 1998
             @@d20000101
             Will display the number of days until the year 2000 (Y2K),
             provided that you read this document before Jan 1, 2000 :).

(2) Description: Number of hours since an event took place
    Format : @@hMMDDHHmm
    Meaning: h ...... data type identifier
             MM ..... month in two-digit parameter format (range 01 to 12)
             DD ..... day of the month in two-digit parameter format
                      (range 01 to 31)
             HH ..... hour of the day in two-digit parameter format
                      (range 00 to 23)
             mm ..... minute in two-digit parameter format (range 00 to 59)
    Example: @@h01010000
             Will display the number of hours and minutes in the New Year
    Note   : The system will automatically determine the year of the event,
             defined by the closest date within 1 year from now. Therefore,
             if you define a future event, it will be modified to reflect a
             past event.

(3) Description: Number of hours until an event will take place
    Format : @@HMMDDHHmm
    Meaning: H ...... data type identifier
             MM ..... month in two-digit parameter format (range 01 to 12)
             DD ..... day of the month in two-digit parameter format
                      (range 01 to 31)
             HH ..... hour of the day in two-digit parameter format
                      (range 00 to 23)
             mm ..... minute in two-digit parameter format (range 00 to 59)
    Example: @@H01010000
             Will display the number of hours and minutes until the next 
             New Year
    Note   : The system will automatically determine the year of the event
             defined by the closest date within 1 year from now. Therefore,
             if you define a past event, it will be modified to reflect a
             future event.
             This data type works like a count-down clock; in the very
             minute when the event is reached, it will display 0:00, but one
             minute thereafter it will change to 1 year minus 1 minute again.

(4) Description: Display Global Village local time
    Format : @@t
    Meaning: t ...... data type identifier
    Example: @@t
             Will insert the local time in two-digit hour and two-digit
             minute format. This results in outputs of " 5:18" for a.m.
             times, and "23:55" for p.m. times. Please note that there
             is always one character reserved for the first digit.

(5) Description: Display time with timezone correction
    Format : @@l+KK
             @@l-KK
    Meaning: l ...... data type identifier
             + ...... add correction to Global Village local time
             - ...... subtract correction from Global Village local time
             KK ..... correction time in hours, two-digit parameter format
                      (in the range from 00 to 99, but the the result is
                      always the remainder of a division by 24, so 01 is
                      equivalent to 25)
    Example: @@l-01
             Will insert the Global Village time, minus one hour. Since GV
             time is GMT+1, this reflects Greenwich Mean Time (GMT).
             @@l+08
             Will insert some Asian-Pacific time, GMT+9
    Note   : If you know your time difference to GMT, you have to subtract
             one hour from the time difference in order to apply the
             correction.

(6) Description: Date in short format
    Format : @@a
    Meaning: a ...... data type identifier
    Example: @@a
             Will insert today's date in a short format, month/day/year
             (e.g. 1/1/99)

(7) Description: Date in long format
    Format : @@A
    Meaning: A ...... data type identifier
    Example: @@A
             Will insert today's date in a long format, day_of_week +
             month + day of month + year
             (e.g. Mon Jan 18, 1999)

(8) Description: Online time
    Format : @@o
    Meaning: o ...... data type identifier
    Example: @@o
             Will insert the user's online time (time elapsed since his
             login), in a hour:minute format.
    Note   : When profiling a user, this information is not available.
             Therefore it will be substituted by the string "N/A" instead
             of a time "hh:mm" in the profile. You will be able to see
             the information in the wholist, however, if the user is online.

(9) Description: Idle time
    Format : @@i
    Meaning: i ...... data type identifier
    Example: @@i
             Will insert the user's idle time (time elapsed since his
             latest keypress), in a hour:minute format.
    Note   : When profiling a user, this information is not available.
             Therefore it will be substituted by the string "N/A" instead
             of a time "hh:mm" in the profile. You will be able to see
             the information in the wholist, however, if the user is online.
             Note that idle times less than five minutes cannot be resolved.
             In that case, the output results in the string "< 0:05". Idle
             times greater or equal than five minutes are displayed normally.

(10) Description: Amount of CUBES
     Format : @@cX
              @@CX
     Meaning: c ...... data type identifier, calculation uses just the user's
                       cash as reference
              C ...... data type identifier, calculation basis is the user's
                       complete money (including stocks and money at the bank)
              X ...... any number of digits in the range 0 to 9
     Example: @@c1234
              Will calculate the difference between the user's cash and
              1234 CUBES. The absolute value of the resulting number will be
              inserted.
              @@C0
              Will display the user's complete money in the doing field.
     Note   : The number referenced to by 'X' in the format description
              may have any desired number of digits. However, using
              excessively large numbers (beyond 2.1 billion) results in an
              overflow within the calculation and produces a wrong result;
              therefore the usage of such numbers is not recommended.

General notes for all data types:

If you provide an incorrect parameter format, the output will be as follows:
- Either the automatic analysis of the parameters will terminate, and your
  doing field will display the bare code in the way you entered it,
- Or the parameters can be parsed in some way, resulting in the output of
  wrong data, or the cutting off of normal texts in your doing field.
Which of these cases will take place, depends on the part of the data which
is wrong, and of course up to a certain degree on the question whether the
provided data can still be interpreted as valid parameters.

As stated often in this document, it is possible to embed the 'fancy doing'
character sequences in other text in your doing, so that you can (e.g.)
enter "Today is the @@d19990101th day", resulting in the output of (e.g.)
"Today is the 18th day".

However, it is only possible to use _ONE_ 'fancy doing' sequence in your
doing field. Using a second one, either the same or a different one, will
result in the evaluation of the first one, but the display of the code
sequence in any further occurance.

The length of a user's doing field is limited. Given that an escape sequence
is substituted by it's representing value, the resulting output can either
be longer, equal to, or shorter in length, compared to the entered text in
the doing field. Therefore it is easily possible to make the doing field
overflow. To prevent this, the input is parsed, evaluated, substituted, and
after these operations, the doing field is cut to it's maximum length.
That's why a full output may not be visible at any time.

If you encounter a bug, please report it. But please mind that erroneous
bug-reports have a negative influence on the programmer's idealism ...

Finally, the programmer wishes you a lot of fun with these new functions! :)

- Michael Tritthart
  a.k.a. Mike

Last Updated