Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 25th, 2007, 01:44 PM
spasticus spasticus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: S.Wales
Posts: 7 spasticus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 15 m 14 sec
Reputation Power: 0
Send a message via MSN to spasticus
Unhappy Turbo Pascal

hey - im new. any pascal experts here?

err... ok, i've got a variable (integer) which i need to check to see if it's blank or if it isn't (i don't know what the value will be)

who new something so simple could be so hard to do?

i've tried loads of combinations like:

if var1 = nil
if var1 not = nil
if var1 <> nil

Help! assignment has to be in by Friday.

Thanks.

Reply With Quote
  #2  
Old April 25th, 2007, 02:26 PM
medialint's Avatar
medialint medialint is offline
spirit duplicator
Click here for more information.
 
Join Date: Apr 2004
Location: \\Firecrate\
Posts: 12,325 medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)medialint User rank is General 24th Grade (Above 100000 Reputation Level)  Folding Points: 232775 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232775 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232775 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232775 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232775 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232775 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Months 3 Weeks 11 h 47 m 19 sec
Reputation Power: 2578
It's been a while but isn't Nil just for pointers? I believe an integer would be zero if no value was assigned to it.
__________________
medialint.com

"Energy has the opportunity to change the climate if it's done right." - Sen. John Ensign, R-Nev. (quoted out of context)

Reply With Quote
  #3  
Old April 25th, 2007, 02:53 PM
spasticus spasticus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: S.Wales
Posts: 7 spasticus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 15 m 14 sec
Reputation Power: 0
Send a message via MSN to spasticus
i have no idea. i dont know what a pointer is. and no its not 0 it comes up with a random value each time.

Reply With Quote
  #4  
Old April 26th, 2007, 11:33 AM
Kaboodle Kaboodle is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 5 Kaboodle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 32 m 24 sec
Reputation Power: 0
In Pascal, surely, you have to define a variable in order for it to work. You know this, I assume.

Initialising the variable is another matter - giving it a value. Now, logically, it can be deduced that there shouldn't be a problem here - if it's initialised, then you know what the value is. Because you've initialised it. If you haven't initialised it, then you can't reference it, and test it for 'blankness', because the program doesn't know what this value actually means.

I know it doesn't really answer your question, but does it help?

Reply With Quote
  #5  
Old April 26th, 2007, 12:02 PM
spasticus spasticus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: S.Wales
Posts: 7 spasticus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 15 m 14 sec
Reputation Power: 0
Send a message via MSN to spasticus
it does help thanks. the problem's solved now

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Turbo Pascal


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway