Can you compare function return's in a 'while' loop?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
kev82 i know your in the forum now, if you see this don't mind the 'scanf()', i'll be getting rid of it. i must find out if i can do this, if i can...COOL! The above won't compile, but instead give's me a large cascade of error's, which has to be the while loop above, i don't want to see corrected code, but instead would just like to know if i can do it.
Thank's for any reply's.
Error's i can't list because i can't copy the info from konsole in KDE, buuuut
that's all the info i needed anyway, COOOOOOL, and thank's.
{Edit}
Here's the error's.
Code:
[Mirrus][karensmith][04:22:08[/Source][$] gcc login3.c -lcrypt -o /Exec/login3
login3.c: In function `main':
login3.c:53: parse error before `{'
login3.c:55: parse error before `{'
login3.c: At top level:
login3.c:60: parse error before `}'
login3.c:61: parse error before `2'
login3.c:61: conflicting types for `hold'
login3.c:27: previous declaration of `hold'
login3.c:61: warning: data definition has no type or storage class
login3.c:62: parse error before string constant
login3.c:66: warning: parameter names (without types) in function declaration
login3.c:66: conflicting types for `free'
/usr/include/stdlib.h:538: previous declaration of `free'
login3.c:66: warning: data definition has no type or storage class
login3.c:67: parse error before `-'
login3.c:67: conflicting types for `exit'
/usr/include/stdlib.h:577: previous declaration of `exit'
login3.c:67: warning: data definition has no type or storage class
login3.c:69: warning: parameter names (without types) in function declaration
login3.c:69: warning: data definition has no type or storage class
login3.c:70: parse error before `return'
[Mirrus][karensmith][04:22:38[/Source][$]
They don't make sense, i've seen reaction's like this before when doing some funky if statement's, but the rest of the code is solid, i believe it's the while loop. Thank's.
kev82 i know your in the forum now, if you see this don't mind the 'scanf()', i'll be getting rid of it.
LOL, anything that helps you learn is very good i was only talking about a final product in the other thread.
the error appears to be a missing ) on the line with the while on it, or rather an extra ( before the strcpy. vim and emacs bracket matching is a wonderful thing.
kev82, i saw you where in here (lucky for me){edit}(you dissapeared), i can't seem to find the command for bracket matching for vim in ':help', i read the ':help usr_06.txt'
for syntax highlighting, do you just edit the syntax highlighting (?) because i tryed the command ':syntax enable' and the parenthesis where not color coded the way i figured, is that what you mean be bracket matching, color coding?
Thank's for any reply's!
i need to go to sleep - what i meant to say was, if you go over a bracket and press % it will show you the matching bracket, the above should be nicer though.
{edit}
I don't want to keep you up , but is this plugin for 'visual' mode, if it is it's pretty usless to me, i'd rather be able to use 'vim' not in x.
I hope you read this i didn't want to reply to this thread again.
Let me try % in 'vim' out of x and see what happen's.
Thank's.
visual mode is a mode in vim for selecting text and has nothing to do with X it is activated by pressing v in command mode.
the plugin is designed to be used in command mode(where you press x to delete, i to insert, etc) by enabling the plugin \[i as you move over a bracket vim will highlight its matching bracket. the plugin can be disabled by \[s
like that. :) :) :)
kev82 unfortunatly i could'nt get the plugin working, i moved into '/usr/share/vim/vim61/plugin' directory, then tryed enabling it with '\[i'
all i got was 'scanf()' declaration at the bottom, which i couldn't tell was a vim feature, or the plugin? But thank's for everything kev82, and all other's.
{edit} '\[i' with or without the plugin show's the function declaration of the function the cursor is sitting on, still cool though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.