[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Post a better way to clear the screen. PROTIP: you can't

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 10
Thread images: 3

File: rms.png (283KB, 480x451px) Image search: [Google]
rms.png
283KB, 480x451px
Post a better way to clear the screen.
PROTIP: you can't

#include <stdio.h>
#include <stdlib.h>

//Sequential search for balances. 11/5/16

int main()
{

clr();
}


void clr(void)
//clears screen
{
int x = 0;
while(x<25)
{printf("\n");
x++;}
return;

}
>>
>>57413311
you just learned C didn't you
>>
>>
ctrl-L

>>57413311
what if my has more than 25 lines?
>>
>>57413457
*my terminal (emulator)
>>
Get on my level

#include <stdio.h>

int main() {
printf("%s", "\e[0;0H\e[2J");
return 0;
}
>>
>>57413479
clr();
clr();
clr();
clr();
>>
Cracked me up, good job
>>
File: Why-.jpg (235KB, 1000x660px) Image search: [Google]
Why-.jpg
235KB, 1000x660px
>>57413311
> explicitly writing return at end of void function
> not writing return 0 at end of main function
>>
>>57413311
console.log(new Array(require('process').stdout.rows).fill(require('os').EOL).join(''))

look no variables
Thread posts: 10
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.