HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: counter
Operating System - HP-UX
1834744
Members
2681
Online
110070
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2010 01:40 PM
02-04-2010 01:40 PM
counter
need to create a counter in quiz,
def counter num*2=0
def counter1 num*2=1
def counter2 num*2=counter+counter1
def counter3 num*2=counter2+counter1
but I cant figure out how to make it increment? - sound dumb - it is sorry!
def counter num*2=0
def counter1 num*2=1
def counter2 num*2=counter+counter1
def counter3 num*2=counter2+counter1
but I cant figure out how to make it increment? - sound dumb - it is sorry!
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2010 04:27 PM
02-04-2010 04:27 PM
Re: counter
Hi
What language? 'C'?
Is this a binary problem?
2**0 = 1
2**1 = 2
2**2 = 4, etc.
Where is your procedure / code so far?
Here's an untested approximatation for korn shell for a binary counter.
while :
do
EXP=$(($EXP+1))
TOT=$((2**$EXP))
if [[ $EXP -eq 9 ]]
then
break
fi
done
What language? 'C'?
Is this a binary problem?
2**0 = 1
2**1 = 2
2**2 = 4, etc.
Where is your procedure / code so far?
Here's an untested approximatation for korn shell for a binary counter.
while :
do
EXP=$(($EXP+1))
TOT=$((2**$EXP))
if [[ $EXP -eq 9 ]]
then
break
fi
done
Support Fatherhood - Stop Family Law
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2010 05:05 AM
02-05-2010 05:05 AM
Re: counter
DEFINE KNTR NUM*6 = 1
DEF NKNTR NUM*6=1
DEFINE TAG NUMERIC*6 = (NKNTR - 1) + KNTR
REP ITNO KNTR SUBT NORESET
DEF NKNTR NUM*6=1
DEFINE TAG NUMERIC*6 = (NKNTR - 1) + KNTR
REP ITNO KNTR SUBT NORESET
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP