Forum Suggestion Expand code syntax beyond the web languages.

Thread Starter

HunterDX77M

Joined Sep 28, 2011
104
The code block insertion tool is helpful but the only languages that it seems to understand the syntax of are PHP, JavaScript, HTML and CSS. These are all browser and web development languages and it's unlikely people would use them on this forum. Other than that, there's the catch all "General Code" which just puts the code in monospace font.

I think it makes more sense to recognize the syntax of C at least since many mcu programs are written in C. Another useful syntax would be the Arduino sketch syntax. Bash is probably good, too.
 

WBahn

Joined Mar 31, 2012
29,976
Thanks.

Trial:

C:
#include <stdio.h>

#define IMAX (10)

int main(void)
{
   int i = 0;

   while (i++ < IMAX)
      printf("Hello World #%i\n", i);

   return 0;
}
Yep. Works.
 

atferrari

Joined Jan 6, 2004
4,764
Prueba

Code:
   CLRF DIG_BCD_4
    CLRF DIG_BCD_1
    IFDEF RANGE_IS_LOW
        LOADREG DIG_BCD_3,FREQ_INI_U
        LOADREG DIG_BCD_2,FREQ_INI_H
        LOADREG DIG_BCD_1,FREQ_INI_L
        LOADREG CNTR_DIG_BCD,3
    ELSE
        LOADREG DIG_BCD_4,FREQ_INI_U
        LOADREG DIG_BCD_3,FREQ_INI_H
        LOADREG DIG_BCD_2,FREQ_INI_L
        LOADREG CNTR_DIG_BCD,4      
    ENDIF

    MOVFF CNTR_DIG_BCD,BUFF_CNTR_DIG;save No. of digits of the FR_SINE value
    RCALL FR_SINE_TO_DISP_BUF       ;data is ready for sending to LCD display

    RCALL CONV_BCD5_NOT_PACKED_BIN16;convert input (BCD)
    MOVFF NROBIN_H,FR_SINE_H        ;into binary,
Finally....!
 
Top