Qbasicnews.com
How should i do this... - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html)
+--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html)
+---- Forum: FB Documentation (http://qbasicnews.com/newforum/forum-17.html)
+---- Thread: How should i do this... (/thread-7021.html)



How should i do this... - SotSvart - 04-21-2005

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

?


How should i do this... - Jofers - 04-21-2005

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.


How should i do this... - SotSvart - 04-22-2005

I would go for readability


How should i do this... - Jofers - 04-22-2005

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>



How should i do this - D.slert - 11-20-2009

Hi,

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

Thanks,
Jamie