VisorCentral.com
Show 20 posts from this thread on one page

VisorCentral.com (http://discussion.visorcentral.com/vcforum/index.php)
- A place to test things out (http://discussion.visorcentral.com/vcforum/forumdisplay.php?forumid=24)
-- C code play (http://discussion.visorcentral.com/vcforum/showthread.php?threadid=17349)


Posted by potter on 08-02-2001 08:40 PM:

C code play

Using the basic [CODE] tag:

code:
#include <stdio.h> #include "localHeader.h" int main( int argc, char **argv ) { int iVar = 1; double dVar = 2.3; char cVar = 'x'; char *str = "This is a string"; printf( "Testing 1, 2, 3\n" ); if ( iVar ) { do { dVar -= 0.1; } while ( dVar > 0.0 ); } else { printf( "foo\n" ); } return 1; }
Now using the [PHP] tag:
PHP:

#include <stdio.h>
#include "localHeader.h"

int main(
    
int  argc,
    
char **argv )
{
    
int    iVar 1;
    
double dVar 2.3;
    
char   cVar 'x';
    
char   *str "This is a string";

    
printf"Testing 1, 2, 3\n" );

    if ( 
iVar ) {
        do {
            
dVar -= 0.1;
        } while ( 
dVar 0.0 );
    } else {
        
printf"foo\n" );
    }

    return 
1;
}

Hmm, if it did not put the PHP: in befor the code block, this would be very usable for C code.


Posted by potter on 08-02-2001 09:04 PM:

What is that font that is being used in [code]

code:
Sample Code
quote:
Sample Code in Arial
Sample Code in Times
Sample Code in Courier
Sample Code in Century
Sample Code in Lucida Console
Sample Code in Verdana


Ah, I see it is using the fixed width font setting of my browser (currently Lucida Console). Also discovered, one can use the fonts other than those documented in the [font=fontName] tag.

Basically I was looking for a way to refer to code bits in my message and have it appear in the same font as used in the code examples. Now we have [B] which gets mapped to the HTML <B>, [I] which maps to <I>, and [U] which maps to <U>. Is there anything that maps to <TT>? How about [TT]? Noop, that did not work.


All times are GMT. The time now is 11:54 PM.
Show 20 posts from this thread on one page

Powered by: vBulletin Version 2.3.4
Copyright © Jelsoft Enterprises Limited 2000 - 2016.