Qbasicnews.com
November 13, 2019, 07:38:59 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Code translator  (Read 8148 times)
westie
Member
*
Posts: 64



« on: January 28, 2003, 09:41:04 PM »

i want to make a translator that will print what i write in english into code. how do i do that
Logged

img]http://forums.rleague.com/images/avatars/westsig.gif[/img]

go the mighty maggies.
(thanks yakstorm)

i regularly visit a rugby league version of these forums. i have amassed almost 2k worth of messages.
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #1 on: January 28, 2003, 10:01:07 PM »

Use Quickbasic.
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #2 on: January 28, 2003, 10:13:17 PM »

I'd suggest you to begin learning from the beginning Wink It is like I posted "I want to make Doom IV. How do I do that?"
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Neo
Na_th_an
*****
Posts: 2150



« Reply #3 on: January 29, 2003, 08:45:39 AM »

Yeah, first read yourself into some old dusty books, and then please specify your question.
Logged
Agamemnus
x/ \z
*****
Posts: 3491



no
« Reply #4 on: January 29, 2003, 03:53:03 PM »

nooooooo

NO BOOKS just KNOWLEDGE

KNOWLEDGE=pOWER
QuickBASIC=POWER
QuickBASICI Programming = Attainment of Knoweledge!![/b]
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
toonski84
__/--\__
*****
Posts: 2567



« Reply #5 on: January 29, 2003, 05:58:44 PM »

"QuickBASIC=POWER"

you're satan, arent you?
as for the question, no.  there are no such translators available.  if there was no one would code anymore.  basic was kinda designed to be that, having all its keywords english words, and so was perl, having the world's most flexible and easily abused syntax but you're just going to have to stick with learning to program.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #6 on: January 29, 2003, 08:32:23 PM »

Just try COBOL   Cheesy
Logged

Antoni
LooseCaboose
I hold this place together
*****
Posts: 981



« Reply #7 on: January 29, 2003, 09:53:39 PM »

It wouldnt be to hard to write a translator for programming-language-like-english to Qbasic. You could probably do this very easily with the C preprocessor. e.g.
Code:

reset counter
while counter is less than 100
  add one to counter
  print value of counter
end while loop


Although Qbasic is already very close to this kind of syntax. The other thing to releasise is that a language like this is very inflexible, it is only good for very high level things. Languages such as asm and C, on the other hand are tied very closely to the way the machines work, so they are more powerful. The closer you go towards human understanding, the futher you move from machine understanding. Its one of those inevitable trade-offs in computer science.

If you were invisaging a program that could take an english description of a program and code it for you, eg:
Code:

User: Okay computer, I want an address book program that records names, addresses and phone numbers of my friends.
Computer: How many addresses does it need to store?
User: Umm, quite a few, lots.
Computer: Should it be web-based or not?
User: Err gee, I dunno. Maybe, just as long as it has lots of pretty colours.
Computer: Okay, one address book program coming up....


Then you might want to wait a few years for research in AI to get better. In the meantime you can always try MSVC++, you just tell clippy what you want and he will sort you out something intersting :roll: j/k
Logged

esus saves.... Passes to Moses, shoots, he scores!
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2369



« Reply #8 on: January 29, 2003, 09:55:17 PM »

Quote from: "Antoni Gual"
Just try COBOL   Cheesy


Come now, no talking about this new fangled languages.. now to find my current punch card account program.. ;-)
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #9 on: January 29, 2003, 10:52:12 PM »

bleh, you kids and your punch cards *turns metal crank and starts counting iron cylinders*
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #10 on: January 30, 2003, 02:44:29 AM »

Wonder how this would translate....

BASICA Code Rel Made:

1. Measure 1/3 cup of Flour
2. Mix Eggs
3. Add Sugar
4. Add Coloring
5. Mix the ingredients all together
6. Bake until brown
7. End

:*)
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
westie
Member
*
Posts: 64



« Reply #11 on: January 30, 2003, 03:45:13 AM »

dudes, dudes, dudes....... uve got me wrong.

im talking about an enigma type thing.

A=E
B=U

ETC ETC.

im just looking to write a program that u can input a sentence and the comp will print the translation.
Logged

img]http://forums.rleague.com/images/avatars/westsig.gif[/img]

go the mighty maggies.
(thanks yakstorm)

i regularly visit a rugby league version of these forums. i have amassed almost 2k worth of messages.
LooseCaboose
I hold this place together
*****
Posts: 981



« Reply #12 on: January 30, 2003, 04:16:23 AM »

Ohhhhhh, you mean encryption  :roll:, whoops.

One of the simplest forms of encryption is simple rotation. In rot1 A->B, B->C and Z->A. Rot13 is the most common rotation because its halfway along the alphabet, its major drawback however is that it is extremely trivial to break.

You could have a look at cipher systems such as playfair, vignere, RSA(difficult, very secure), PGP, etc. Most cipher systems that are difficult to crack also involve some very complex mathmatics.

To write a simple encryption program in Qbasic you could either use a formula based method (eg rot13) on each letter or you could use a lookup table for encrypting each letter (requires that the table be transmitted to the reader of the code, but then how do you encrypt the table :Huh: ). Both methods should be relatively simple exercises in programming.
Logged

esus saves.... Passes to Moses, shoots, he scores!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!