Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

search of delimiters

Posted on 1998-03-19
5
Medium Priority
?
198 Views
Last Modified: 2010-04-02
start            word         delimiters
------->0 ----------> 1   ------------->2
                     |
                 loop (search for word or digit)
STATE 0 CAN NOT VISITED IF FIRST CHARACTER
ISN'T WORD
IN THIS CASE THE FIRST CHARACTER MUST BE
A WORD.IF TRUE DO STATE 1 AND LOOK NEXT
CHARACTER UNTIL  THE STATMENT FINISHED.  
WE DOING THAT UNTIL WE FOUND IDENTIFIER
DELIMITERS THAT IN THIS CASE CHARACTER THAT
ISN'T WORD OR DIGIT(FOR EX.  ,  ; * - + / ) : ETC)


PLEASE MELP ME TO CREATE THE PROGRAM
0
Comment
Question by:lagat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 1257763
Seems like homework.

Write a state machine.

A possible way of doing it:

Use a variable that represents the current state.
In a loop: use a SWITCH statement where each CASE represents a state's actions and transitions to other states, based on the input (getch() or similar).

Write something.  Post it here if you have problems and we'll help.
0
 
LVL 1

Expert Comment

by:Nexial
ID: 1257764
And the switch statement itself should be enclosed in an input loop.

Alexo is right - post what you have done or tried and we will help.   You should at least try, especially if it is homework
0
 
LVL 2

Expert Comment

by:sprinkmeier
ID: 1257765
For extra credit, do it with YACK/LEXX!
0
 
LVL 84

Expert Comment

by:ozo
ID: 1257766
It looks like this might even be doable with a scanf.
But the problem statement is rather unclear to me,
If you could post the code you've written, we may be able to help
you with debugging it.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 total points
ID: 1257767
the C library function strtok should do what you want.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question