View Single Post
  #34    
Old January 12th, 2012 (06:11 PM). Edited January 12th, 2012 by droomph.
droomph's Avatar
droomph
mmm gurl that 90s
Community Supporter
 
Join Date: Sep 2011
Location: bar'jách
Age: 17
Gender: Male
Nature: Impish
Well mainly I wouldn't need loops, I was bored one day and thought "maybe me could implements something like C into it! durr" And this is what exploded out of that.

And #include, #define, and such were out of the question, so I thought maybe...bleh

Anyways, whatever not important

The only C elements we'll (as in noobs like me) need, if at all, are these...
Spoiler:
A simple shorthand for if...then, else (as in no compare crap in front of if1s and if2s)
Spoiler:
Code:
@if
if variable condition number
	then statement
	else statement2

next
Code:
@if
	compare variable number
	if1 condition @then
	jump @else

	@then
	statement
	jump @return

	@else
	statement2
	jump @next

	@next


A neater switch, case n, default
Spoiler:
Code:
@switch
switch variable condition number
	case condition:
		statementcase condition2:
		statement2
…
…
…
…
	default:
		statement3	return '}

next
Code:
	@swtich
	compare variable number
	if1 condition @case
	if1 condition2 @case2
…
	call @default
	jump @next

	@case
	statement
	jump @statement2

	@case2
	statement2
	jump @…

…
	jump @default

	@default
	statement3
	jump @next

	@next
possibly break;

Code:
breaknext
Code:
	goto @next
	…
	@next


variable++ (just easier to read, nothing much)
Spoiler:
Code:
…
variable++

or

…
variable increment
Code:
addvar variable 0x1
Code:
variable operate variable2++
Code:
	operate variable
	addvar variable2
Code:
variable operate ++variable2


And if only absolutely necessary (I can't think of a place where we'll use this):

A neater if...continue
Spoiler:
Code:
@continue
while variable condition number
	statement
	if variable2 condition2 number2
		then continue
	statement2
	return

next
Code:
	@while
	compare variable number
	if1 condition @loop
	jump @next

	@loop
	statement
	compare variable2 number2
	if1 condition2 @loop2
	jump @next

	@loop2
	statement2
	compare variable number
	if1 condition @loop
	jump @next

	@next


And maybe some popular combination instructions (derp)...

condensed lock and faceplayer instructions, as we use them together 90% of the time anyways
Spoiler:
Code:
lockf ;or similar codename
Code:
	lock
	faceplayer
oh right lockall exists too but you know what I mean don't you


And maybe do...while but that's just me.


But just a few ideas from a guy who likes to keep stuff easy.

Anyone can do this on their own, I thought it might be nice.

Apparently I'm wrong. *oh well* *shrugs*

I guess I'll shut up right about now

From the Noobs,
ME SIND IDIOT

FOOTNOTE: I KNOW I suck.