# Turing/Help

Welcome to the Turing help desk. Have a question? Feel free to ask it here, and somebody will try to answer your question promptly.

## In what situations does Turing really work great ?

* In what situations does Turing really work great ? When would I choose Turing over some other language on the Wikibooks:Programming languages bookshelf such as Programming:QBasic or Programming:Prolog or Python Programming ?
* Who uses Turing ?
* Are there any major programs written in Turing ?
* Can Turing run on my PC ?
* Can Turing run on my [[Embedded Systems/PIC ?
* How do I install the Turing compiler/interpreter/IDE on my computer ?
i0 := --DavidCary 00:20, 4 October 2005 (UTC)
   * Hi David. Sorry for the late response. #sorrynotsorry Turing is used primarily as a learning tool, and was designed as such. Since it was made for ease-of-use rather than speed or versatility, the only reason you might use Turing is for a simple program, or if you're just getting started with programming.
   * Mostly high school students
   * To my knowledge, no.
   * Yes, turing runs on windows. It also runs on linux and mac.
   * If you can get linux on it ;)
   * Not that I know of, but I'm not sure.
   * You'll have to buy a copy from holtsoft. If you are a student, and your school/board has purchased a license, you can get a copy for free.
   * Under windows, installation is very simple. I don't use it that often and I haven't used it in a while, so I'm not sure if there are any important notes for installing it on other systems.
    Hope that helped! -Frazzydee|✍ 03:29, 5 January 2006 (UTC)

## passing parameters

why is not passing parameters bad programming style? If it works without passing parameters, why not use global variables?
    The reasons may vary depending on the program. One of the most common reasons is that your procedures/functions may ultimately be included in a library, where people using your programs will want to just pass the parameters straight to it rather than figuring out all the variable needed. -Frazzydee|✍ 04:23, 24 May 2005 (UTC)

## increasing and decreasing a counter by an increasing and decreasing amount??

So i need to increase a value by zero, then one, then -1, 2, -2, 3, -3... and i have no idea on how to do it. i've been trying to use some variation on
but its just doing a+0, a-1, a+1, a-1, a+1 instead of a+0, a-1,a+1,a-2,a+2 HELP!
    I'm not sure I completely understand your question...wouldn't that end up just equalling 0 if you're subtracting and then adding by the same number? -Frazzydee|✍ 11:58, 24 May 2005 (UTC)
It's going a+0, a-1, a+1, a-1, a+1 because -1**1=-1, -1**2=+1, -1**3=-1, -1**4=+1...etc. Try:

## Slowing Down Your Program

How can I slow down the rate at which my program outputs(put) information to the screen? Please help! Urgent!
Answer:
    Use delay(n), where n is the number of milliseconds you want the program to pause for. Example:
will make the program pause for one second before executing the next line. -Frazzydee|✍ 22:53, 6 Jun 2005 (UTC)

## how do you skip lines

is there any way you could skip a line under a certain condition
Example
if x=2 "now i need the computer to avoid the data from line 32 to 45"
    In most cases, you can just store it to a temporary variable in those lines:
    However, I've had cases where you can't store it to a variable at all, and I'm not sure how to get around that. If you find out how, please post it here! :) -Frazzydee|✍ 02:48, 9 Jun 2005 (UTC)

## GOLF SIMULATION ASSIGNMENT

I am in grade 10, and we were just asked to make a simulation program. With variables such as wind, gravity, etc. Anyways, I've been sick for the past week or so and haven't got anything done because I don't have turing at my home. Can anyone send me a program which will simulate a golf shot? It has to have variables such as wind gravity slice and hook of the shot, and the user can enter things such as if he /she is a amateur or pro golfer, therefore affecting how close their shot will be to the hole. Can anyone PLEASE send me a program that will do this. I am in HUGE need. THANKS!

## Hi! Please tell me why this code does not work in turing. it crashes

procedure info (var base, height, L1, L2, L3 : int)
end info
procedure area (var b, h, Area_Triangle : int)
end area
procedure pmeter (var L1, L2, L3, Perimeter_Triangle : int)
end pmeter
procedure areapmeter (var finalarea, finalperimeter, Area_Triangle, Perimeter_Triangle : int)
end areapmeter
    You have redundant variables like b and base and you defined finalarea and final perimeter after the put. Get rid of the redundant variables and you should be fine:

## Centering Text

Could anybody tell me the different ways I can center text in Turing?
    Look up locate in the help file. You will need to know the length of the string to center it properly. -Frazzydee|✍ 03:32, 5 January 2006 (UTC)

## Exercises

How do i write a program that allows the user to input any base 10 number then outputs the number into binary?
    This just keeps on dividing by 2 and recording the remainder, then it reads it backwards. Hope that helped, and sorry for the late response. -Frazzydee|✍ 03:48, 5 January 2006 (UTC)

## strings

outputs a word and determines if the centre word is an uppercase or lowercase?

## Making A RPG Game In Turing

Is it possible to make a RPG in turing? I can make a very basic battle system with hp and such. However I want to make it so you can level up and use items and all that. With a weapon making system of some kind.
Turing is an extremely limited programming tool/language, making an RPG with level ups and weapons would be extremely difficult if not impossible. This is because Turing is used mainly as a learning tool for beginner programmers to show them the basic elements of programming, a better programming language to use would be Java maybe, or C++, I really do not recommend the use of Turing to create a complex game such as the one you describe
I have made a simple (it has levels atk etc.) text based rpg but it is hard to make graphics in my game so instead I want for a retro look if you like doing these kind of things you should go to this website.
http://compsci.ca/v3/index.php?pf=120&h=1&start=0

## connect four

I need help writing a program for a video connect four game. I just had pneumonia and have missed 2 weeks or so of school. This project is due very soon and I'm not very good at turing. Please help me, that would be greatly appreciated. Thank you so much.
Of course you can make an RPG in Turing. Now, it won't be the graphical equal to Final Fantasy X, but you can make something that looks like a game from the Nintendo/Super Nintendo era without much trouble at all.

## Mastermind

I need to create the game mastermind in Turing code for school. I am extremely lost and confused. I would deeply appreciate the code if someone has it or even just some general help. Thanks
how do I write a program that allows the user to click and make an LED light hooked up to a paper car, hooked up to an experimentor box blink

## I know it

What am I doing wrong, I know it but I can't remember?
Answer:
    := sets the value of a variable. You should be using = for comparison (eg. comparing the value of label to "a"). Try that, and come back if it still doesn't work...sorry, but I don't have time to test it myself right now :( -Frazzydee|✍ 22:58, 26 February 2006 (UTC)

## A chat program, with a GUI

I've got 95% of the code complete. I'm stumped at the actual transfer of information though! I can open a connection, and connect, but I have no way of passing information between the server and the client! Can someone help?
    You should be able to use get and put, IIRC. Is there any reason why "get : ns, stringvar" won't work? (where ns is your netstream and stringvar is a string variable). If you're still having trouble, post your code somewhere and I'll take a look at it. -Frazzydee|✍ 23:00, 26 February 2006 (UTC)
umm yee I just wanted to know like i understand the how the loops work but I don't understand how you get the program to loop so that it starts over again if the user prompts it to like for example. in the case such as you have the program run then you get to the end and you loop it so it says exit program if word = no( the user says no i don't want to play again) but how do you get it to start over if the user says yes they do want to start over again?

## Linking

I'm working on a turing project for school (grade 10 FTW), and I have to create a welcome screen to use in all of my programs. The problem is, I made a really nice one (at least nice for what we've learned so far) but the code it really long. I don't want to have to copy that into the top of my program every time. Is there a line of code that I can put into the top of each program to tell it to run the welcome screen first, then continue on to the rest of the program?
You can use include.
For example, if your welcome screen is in a file called welcome.t, you would write
include "welcome.t"
at the beginning of each of your assignments.
Make sure welcome.t is in the same directory as your assignment, though.

## Too many Variables.

I am trying to make a Sudoku game, which has turned out to be a long script. Is there a way I could group variables together to make thing simpler. e.g. loop if a1 = {anyone of the Variable groups} then a1 := a1+1
== Hi, I was wondering if anyone could tutor me for turing 4.1.1
Hello, while I won't Tudor you, you may find it helpful to look up arrays in the turing reference.
var sampleArray1: array 1..9,1..9 of int %Creates an array
var sampleArray2: array 1..3,1..6 of int: %Creates an array and assigns puts values into the array
sampleArray1(1,3):=6 %Assigns the integer 6 to index 1,3 of the array
I hope this helps :)

## HELP!

Hey, can anyone tell me what the problem is with this code? It's a program for a rock paper scissors game.
Answer
    You are not using boolean properly. Rewrite (p1 = "p" or "P") to (p1 = "p" or p1 = "P"), so the first line would be:

## Turing help

Can anyone help me, I need to make a scene where a cowboy jumps off a cliff onto his horse, and rides away. I can make the scene, but I cant seem to get the cowboy to jump down to the horse, and ride away. They are stick figures by the way, on a brown box.

## Process and Procedures

I have a bunch of procedures and at the beginning of each i wanna put a music with a fork. i got it to work but it won't work inside the procedure because u cant' have a process in a procedure. what do i do? please help me!!

## problem with strings

The following code is for a simulated game of mastermind. This is the basic code. Unfortunately, I am having trouble with some of the strings and I've high lighted it... it says *****PROBLEM AREA****
Answer:
    Not sure what is what your are trying to do in the problematic section. My guess is that you would need to change the problem area into the following:

## Polygon

I am doing this assignment and i need to move a polygon but i don't no how so can u please tell me how. thanks so much
clear the screen after making the polygon, then just make the same polygon right next to where it was
It probably has something to do with getch and the follow mouse procedure try looking those up and once you know how to use getch you will probably figure it out

## parallel port

How do use the parallelget function. according to my understanding its more complicated than parallelget(64) . Please answer in full detail as i am in g.12. what isBold text MOD and DIV. thanks . ALOT. parallelget is a function with no parameters:
parallelget represents an already determined number, it requires no variables and that is wht parallelget(64) doesn't do anything. use it like a variable, ex. "put parallelget"

## programming alphabetically

yeah, i need to make a program where i ask the user for two words, and then i put it in alphabetical order i have managed to do this by just making my variables word1, and word2, then i just put :
in my program i did include the get statements and the variables... but i just put in the general idea i had for putting things alphabetically. The problem is, both words have to be either upper case, or lower case, i cant word1 as upper, and word2 as lower because lower case words are larger than upper even if the upper starts with "Z" and the lower starts with "a", my program will still display after the words are inputted, Z is before a. how do i make it so it says a before Z?

## Base converter (base 2, 8, 10, 16 conversions)

hi!
i was wondering if i could get some help in converting numbers
i need to convert decimal, hexadecimal, binary and octal into each other
i know that
will change decimal_in to binary_out
and
will change the number back to decimal
I am having difficulty with binary to octal/hex, octal to decimal/binary/hex, and hex to decimal/binary/octal
please help me! thanks ==> why not just convert binary string back to integer (base 10) first? Then you can use "intStr(int, 0, <base>) to convert to Hex or Octal string?

## character movement

BETTER QUESTION: How do you do WASD or Left Right Up Down without gravity, more specifically how do you move UP AND DOWN? There is no site with this info and I am starting to lose my mind.
Here is the code so far:
- Alexiler