Qbasicnews.com
January 20, 2018, 05:37:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How should i do this...  (Read 5241 times)
SotSvart
Member
*
Posts: 61



WWW
« on: April 21, 2005, 03:09:51 PM »

How can i add a table looking something like this in the docs:
Code:

Bit in numeric_value1  Bit in numeric_value2  Bit in result
        0                      0                    0
        1                      0                    0
        0                      1                    0
        1                      1                    1



?
Logged
Jofers
Been there, done that
*****
Posts: 1040



WWW
« Reply #1 on: April 21, 2005, 03:59:33 PM »

That's a new one.  I'll propose this structure:

Code:
<chart>
     <column>
           <a>0</a>
           <b>0</b>
           <result>0</result>
     </column>
     <column>
           <a>0</a>
           <b>1</b>
           <result>0</result>
     </column>
     <column>
           <a>1</a>
           <b>0</b>
           <result>0</result>
     </column>
     <column>
           <a>1</a>
           <b>1</b>
           <result>1</result>
     </column>
</chart>


That shouldn't confuse a script too much.  If rows, use a horizontal layout.  If columns, use a vertical.  Else, crap out with an error.

Don't do it just yet.  If someone has any suggestions, I'd gladly take them.  I'm toying with the idea of replace "row" and "column" with "group" and adding a layout attribute, but I don't know.

Some people may prefer "col" to "column"  I do a lot of cutting and pasting when doing html/xml though, so I prefer readability.  However, some people may like "col" better, and I can live with that if you prefer it also.

Also, use alias for any wierd column names, as described in the manual.
Logged
SotSvart
Member
*
Posts: 61



WWW
« Reply #2 on: April 22, 2005, 04:59:45 AM »

I would go for readability
Logged
Jofers
Been there, done that
*****
Posts: 1040



WWW
« Reply #3 on: April 22, 2005, 10:32:59 AM »

Oh, my goodness, I'm a nutbag.  I can't believe I mixed up my own language.

Use the 2d chart format described in the documentation guide.
That is, this:
Code:

<chart>
     <row>
           <a>0</a>
           <b>0</b>
           <result>0</result>
     </row>
     <row>
           <a>0</a>
           <b>1</b>
           <result>0</result>
     </row>
     <row>
           <a>1</a>
           <b>0</b>
           <result>0</result>
     </row>
     <row>
           <a>1</a>
           <b>1</b>
           <result>1</result>
     </row>
</chart>
Logged
D.slert
New Member

Posts: 7


WWW
« Reply #4 on: November 19, 2009, 05:27:51 PM »

Hi,

The code in the very first post still works OK. That is how I would recommend doing it.

Thanks,
Jamie
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!