news | articles | reviews | software | modules | accessories | discussion | faq | mobile | store
VisorCentral.com >> Discussion >> Other Areas of Interest >> A place to test things out
C code play

Post a New Thread | Post A Reply

  Last Thread   Next Thread
Author
Topic: C code play    
potter
Member

Registered: Feb 2000
Location: SW Virginia
Posts: 290

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.

potter is offline Old Post 08-02-2001 08:40 PM
Click Here to See the Profile for potter Edit/Delete Message Reply w/Quote
potter
Member

Registered: Feb 2000
Location: SW Virginia
Posts: 290

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.

potter is offline Old Post 08-02-2001 09:04 PM
Click Here to See the Profile for potter Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 06:25 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
[ Show a Printable Version | Email This Page to Someone! | Receive updates to this thread ]

Forum Jump:

Powered by: vBulletin Version 2.3.4
Copyright ©2000, 2001, Jelsoft Enterprises Limited.