Results 1 to 3 of 3

Thread: Lianja basic data navigation

  1. #1
    Junior Member
    Join Date
    Jul 2015
    Posts
    7

    Lianja basic data navigation

    I could use a little help understanding the Lianja basic data navigation.
    This is the help page I'm referencing
    http://lianja.com/doc/index.php/Exam...navigation_rsp

    And this is the code section: It differs slightly from the section above that displays the field name.
    What does the Scan and Endscan signify and what does the '&' sign just before the (field(i)) do?
    Thanks in advance.

    // Display the data in a table
    scan
    ? "<tr valign='top'>"
    for i = 1 to fcount()
    ? "<td>"
    ? &(field(i))
    ? "</td>"
    next
    ? "</tr>"
    endscan
    // close the table and the database

  2. #2
    Lianja Team davefoss's Avatar
    Join Date
    Feb 2012
    Posts
    111
    Quote Originally Posted by bwwalker3@gmail.com View Post
    I could use a little help understanding the Lianja basic data navigation.
    This is the help page I'm referencing
    http://lianja.com/doc/index.php/Exam...navigation_rsp

    And this is the code section: It differs slightly from the section above that displays the field name.
    What does the Scan and Endscan signify and what does the '&' sign just before the (field(i)) do?
    Thanks in advance.

    // Display the data in a table
    scan
    ? "<tr valign='top'>"
    for i = 1 to fcount()
    ? "<td>"
    ? &(field(i))
    ? "</td>"
    next
    ? "</tr>"
    endscan
    // close the table and the database

    SCAN ... ENDSCAN is documented here:

    http://www.lianja.com/doc/index.php/SCAN

    The "&" character indicates a macro substitution:

    http://www.lianja.com/doc/index.php/%26

    So basically the code is looping through and displaying the data from each column.

  3. #3
    Junior Member
    Join Date
    Jul 2015
    Posts
    7
    Hello Dave,
    Thank you for those explanations.
    And the references too. This is very helpful.
    I could see what the code was doing but just did not understand the syntax.
    Appreciate your help.
    Bill

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us