Computer Science Canada
Programming C, C++, Java, PHP, Ruby, Turing, VB
Username:
Password:
Register
Wiki
Blog
Search
Turing
Chat Room
Members
Input + when statement?
Index
->
Programming, Turing
->
Turing Help
Author
Message
xevious
Posted:
Sun Nov 13, 2005 11:30 am
Post subject: Input + when statement?
First off, I can't get keydown to work at all.
I took this straight from the examples, and it won't work
code:
var chars : array char of boolean
Input.KeyDown (chars)
if chars ('t') then
put "The T key is pressed"
end if
Is there something wrong with that?
I was also wondering if it is possible to combine some form of input with a when statement.
something like
if chars ('t') when x=300 then *do something*
[/code]
Sponsor
Sponsor
MysticVegeta
Posted:
Sun Nov 13, 2005 11:37 am
Post subject: (No subject)
you need it in a loop
xevious
Posted:
Sun Nov 13, 2005 11:46 am
Post subject: (No subject)
MysticVegeta wrote:
you need it in a loop
ok thanks, I have that working now
but is there any way to put a when statement in that loop so it only does something when you press the button at a specific time?
Cervantes
Posted:
Sun Nov 13, 2005 12:19 pm
Post subject: (No subject)
code:
if chars ('t') and x = 300 then
Or perhaps,
code:
if chars ('t') and x >= 300 then
MysticVegeta
Posted:
Sun Nov 13, 2005 12:49 pm
Post subject: (No subject)
xevious wrote:
at a specific time?
you mean at a specific location right?
Tony
Posted:
Sun Nov 13, 2005 1:33 pm
Post subject: (No subject)
xevious wrote:
but is there any way to put a when statement in that loop
when
statement doesn't actually have anything to do with time. It's a condition much like
if
, just different syntax.
Turing:
function
(
)
when
condition
=
true
is equavalent and will behave identical to
Turing:
if
condition
=
true
then
function
(
)
end
if
xevious
Posted:
Sun Nov 13, 2005 2:38 pm
Post subject: (No subject)
MysticVegeta wrote:
you mean at a specific location right?
yeah, that's what I meant, and I'll mess around with
code:
if chars ('t') and x >= 300 then
I think I can get it to work...
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
Index
->
Programming, Turing
->
Turing Help
Page
1
of
1
[ 7 Posts ]
Jump to:
Select a forum
CompSci.ca
------------
- Network News
- General Discussion
General Forums
-----------------
- Hello World
- Featured Poll
- Contests
Contest Forums
-----------------
- DWITE
- [FP] Contest 2006/2008
- [FP] 2005/2006 Archive
- [FP] 2004/2005 Archive
- Off Topic
Lounges
---------
- User Lounge
- VIP Lounge
Programming
--------------
- General Programming
General Programming Forums
--------------------------------
- Functional Programming
- Logical Programming
- C
C
--
- C Help
- C Tutorials
- C Submissions
- C++
C++
----
- C++ Help
- C++ Tutorials
- C++ Submissions
- Java
Java
-----
- Java Help
- Java Tutorials
- Java Submissions
- Ruby
Ruby
-----
- Ruby Help
- Ruby Tutorials
- Ruby Submissions
- Turing
Turing
--------
- Turing Help
- Turing Tutorials
- Turing Submissions
- PHP
PHP
----
- PHP Help
- PHP Tutorials
- PHP Submissions
- Python
Python
--------
- Python Help
- Python Tutorials
- Python Submissions
- Visual Basic and Other Basics
VB
---
- Visual Basic Help
- Visual Basic Tutorials
- Visual Basic Submissions
Education
-----------
- Student Life
Graphics and Design
-----------------------
- Web Design
Web Design Forums
---------------------
- (X)HTML Help
- (X)HTML Tutorials
- Flash MX Help
- Flash MX Tutorials
- Graphics
Graphics Forums
------------------
- Photoshop Tutorials
- The Showroom
- 2D Graphics
- 3D Graphics
Teams
------
- dTeam Public
Style:
Appalachia
blueSilver
eMJay
subAppalachia
subBlue
subCanvas
subEmjay
subGrey
subSilver
subVereor
Search:
You can syndicate this boards posts using the file
backend.php
or view the
topic map using sitemap.php.
Terms of Use
|
Privacy Policy