answersLogoWhite

0


Best Answer

Writing your own programming language is an incredibly ambitious, and almost unachievable, goal. You won't be able to do this on your own unless you are a hardworking genius. Writing a programming language entails making a way for the average individual to communicate with electronic equipment. To make a language you need a working knowledge of the electronics you are making the language for - either a CPU or a smaller chip.

When you understand how all the 1s and 0s (off and on, respectively) work, then you can combine them to create definitions for different programming words (i.e. Add, Subtract, If/Then, etc.).

An alternative is to base your programming language off another programming language. In other words, if you would like to simplify a language like C then you would need a working knowledge of that language. From that knowledge, you can create definitions which can be used to invoke C code.

There are programs to create compilers -- YACC is the most well known of them (use Google for details).

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

1. #define maxsize 6

2. void quicksort(int arr[], int low, int high) {

3. int i = low;

4. int j = high;

5. int y = 0;

6. /* compare value */

7. int z = arr[(low + high) / 2];

8.

9. /* partition */

10. do {

11. /* find member above ... */

12. while(arr[i] < z) i++;

13.

14. /* find element below ... */

15. while(arr[j] > z) j--;

16.

17. if(i <= j) {

18. /* swap two elements */

19. y = arr[i];

20. arr[i] = arr[j];

21. arr[j] = y;

22. i++;

23. j--;

24. }

25. } while(i <= j);

26.

27. /* recurse */

28. if(low < j)

29. quicksort(arr, low, j);

30.

31. if(i < high)

32. quicksort(arr, i, high);

33. }

mergesort(int a[], int low, int high)

{

int mid;

if(low

{

mid=(low+high)/2;

mergesort(a,low,mid);

mergesort(a,mid+1,high);

merge(a,low,high,mid);

}

return(0);

}

merge(int a[], int low, int high, int mid)

{

int i, j, k, c[50];

i=low;

j=mid+1;

k=low;

while((i<=mid)&&(j<=high))

{

if(a[i]

{

c[k]=a[i];

k++;

i++;

}

else

{

c[k]=a[j];

k++;

j++;

}

}

while(i<=mid)

{

c[k]=a[i];

k++;

i++;

}

while(j<=high)

{

c[k]=a[j];

k++;

j++;

}

for(i=low;i

{

a[i]=c[i];

}

}

  1. void bubble(int a[],int n)
  2. {
  3. int i,j,t;
  4. for(i=n-2;i>=0;i--)
  5. {
  6. for(j=0;j<=i;j++)
  7. {
  8. if(a[j]>a[j+1])
  9. {
  10. t=a[j];
  11. a[j]=a[j+1];
  12. a[j+1]=t;
  13. }
  14. }
  15. }//end for 1.
  16. void restoreHup(int *a,int i)
  17. {
  18. int v=a[i];
  19. while((i>1)&&(a[i/2]
  20. {
  21. a[i]=a[i/2];
  22. i=i/2;
  23. }
  24. a[i]=v;
  25. }
  26. void restoreHdown(int *a,int i,int n)
  27. {
  28. int v=a[i];
  29. int j=i*2;
  30. while(j<=n)
  31. {
  32. if((j
  33. j++;
  34. if(a[j]
  35. a[j/2]=a[j];
  36. j=j*2;
  37. }
  38. a[j/2]=v;
  39. }

79. main()

80. {

81. int i,s;

82. printf("enter the number of numbers to be entered \n");

83. scanf("%d",&s);

84. for(i=0;i)

85. {

86. printf("enter the number \n" );

87. scanf("%d",&A[i]);

88. }

89. printf("array before sorting ");

90. Printf("1.quick 2.merge 3.merge")

91. Printf("enter your choice");

92. Scanf("%d",&ch);

93. Switch(ch)

94. {

95. Case: printf("you have opted for quicksort");

96. Quicksort(A,0,n-1);

97. Break;

98. Case 2:printf("merge sort");

99. Mergesort(A,0,n-1);

100.Break;

101.Case 3:printf("heap sort");

102. Heapsort(A,n);

103.break;

104.case 4:printf("heap sort")

105.

106.Default:printf( "you have enterd wrong choice");

107.}

108.For (i=0;i

109.Printf("%d",A[i]);

110.}

HERE AFTER COMPLIATION IT IS SHOWING ME DECLARATION SYNTAX ERROR HOW I CORRECT THIS

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

You don't. HTML is a markup language. It doesn't possess the logic available to produce a program.

That said, you can write an HTML document using any basic text editor.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

I suppose you meant to ask: 'How do you write own programming language?' Well, this question has been answered already, but I think you should wait a few years before you start it.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

With ease young padawan, with ease.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write your own programming language from scratch?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is COBOL programming language?

You have answered your own question: it is a programming language.


What coding language was five nights at freddys coded in?

Five Nights at Freddy's was created using Clickteam Fusion, which is a game development tool that uses its own coding language called Clickteam Fusion. This software allows developers to create games without needing to write code from scratch.


When was scratch made?

Hello there ,Scratch is a free educational programming language that was developed by the Lifelong Kindergarten Group at the Massachusetts Institute of Technology (MIT). It has the tools for creating interactive stories, games, art, simulations, and more. Scratch even has its own paint editor and sound editor built-in.Users program in Scratch by dragging blocks from the block palette and attaching them to other blocks like a jigsaw puzzle. Structures of multiple blocks are called scripts. This method of programming (building code with blocks) is referred to as "drag-and-drop programming".- noizyoyster.com


How do you create your own operating system from scratch without any knowledge?

You cannot code an operating system without any knowledge of Programming. Developing an OS from scratch requires skills and a good knowledge of programming. It is not an easy task to develop an OS ,but it is not difficult either. To start with , you can start learning Assembly Language ,as this will help you to learn basics of CPU processing and Memory handling. Once you grasp the Assembly language you start of with first of with simple programs in Assembly language. After you have mastered it you can go out for coding a real running OS


What are the words that a programming language puts aside for its own use?

Reserved words.


What are the words that a programming language has set aside for its own use?

Such words are called "keywords".


What does the acronym YOPL stand for?

YOPL stands for &quot;Your Own Programming Language&quot;. It is a term used to describe the process of creating a custom programming language tailored to specific needs or preferences.


What are the advantages of programming?

The main advantage is that you don't have to buy software, you can simply write your own.


Difference between high level language and script language?

There is no real difference; a scripting language is a programming language like any other. We use the term script to infer a programming language that does not need to be compiled to a lower-level code before running. Generally speaking, a scripting language is usually a high-level, interpreted programming language.


How do you learn Java Programming?

you go to school to learn it or you can read books on your own particuarly at amazon just search java programing or google it One of the best ways to learn a new programming language is to write programs in it. Try rooting around in the Java Programming category on this site. Look for questions like "Write a program to...?" and see if you can figure out how to answer them. Sun (now Oracle) has a whole website dedicated to the online versions of print books about learning the various parts and techniques of Java, including a very good introduction to Java programming language.


Why study a language at a level?

Is this question about a natural language, or a programming language? (Anyway, you should consult your own parents and teachers, not random people on the net who do not even know you.)


Database programming language?

Depends upon the database you are talking about MS SQL Server uses SQL and T-SQL programming languages. Oracle is also a SQl based language usings its own 'flavor' PSQL