Angeldust

YouTube Twitch Facebook Instagram Discord Twitter
Steam (Windows, macOS, Linux) Windows iTunes App Store

Website whitespace handling

trong English trong Diễn đàn





Bưu kiện 1–6 của 6

1


OP

qua

Firefly

2 năm trước


The Angeldust website will now properly handle whitespace in forum posts and private messages. Reload the site if you don't see it yet. Here's a demo of indented C source code: #include <stdio.h> int main(int argc, char** argv) { printf("Hello world!\n"); return 0; } Existing forum posts and private messages will now also properly show their whitespace as intended. URL handling should also be slightly more user friendly now. Hopefully this new system lets everyone express themselves even better! Let me know if you run into problems or see potential security issues.


# 2

qua

obi-

2 năm trước


Now we only need a way to run it


# 3

qua

Firefly

2 năm trước


Hello world!


# 4

qua

Hummm

2 năm trước


nice, ... very nice! I did have to shift-reload to get the feature. However, your open curly brace is in the wrong spot. same line is for internal blocks, not functions #include <stdio.h> void ff(void) { printf("Hello, world!\n"); } void gg(void) { printf("Good game mate\n"); } int main(int argc, char** argv) { if (argc > 2) { ff(); } else { gg(); } return 0; }


# 5

qua

obi-

2 năm trước


the real way to do it: #include <stdio.h> void ff ( void ) { printf ( "Hello, world!\n" ) ; } void gg ( void ) { printf ( "Good game mate\n" ) ; } int main ( int argc, char * * argv ) { if ( argc > 2 ) ff () ; else gg () ; return 0 ; } This way you always know where the code is, by looking at the right side. Spaces also help with readability!


# 6

qua

Firefly

2 năm trước


@Hummm: if you're trying to maximize the amount of vertical space your code takes up on screen, I'd recommended one token per line. This results in very readable code that saves 'spaces': int main ( int argc , char ** argv ) { printf ( "Hello world\n" ) ; return 0 ; }


Bưu kiện 1–6 của 6

1