Sponsored Content
Homework and Emergencies Homework & Coursework Questions program to find and print a Fibonacci sequence of numbers. --Errors Post 302715089 by jim mcnamara on Saturday 13th of October 2012 07:00:43 PM
Old 10-13-2012
Take your old C code (it compiles with no errors right?) we'll call it old.c
Code:
gcc -S old.c

A new file old.s which is assembler (for the system you run the gcc command on) will be created. If you run the command on sparc you get sparc assembler.
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

program to find the uncommon numbers between two files.

Hi, I need to extract the uncommon numbers from file1 and file2 For Example: File1 1 2 3 4 5 File2 1 2 3 4 5 6 (2 Replies)
Discussion started by: salaathi
2 Replies

2. Shell Programming and Scripting

Unix help to find blank lines in a file and print numbers on that line

Hi, I would like to know how to solve one of my problems using expert unix commands. I have a file with occasional blank lines; for example; dertu frthu fghtu frtty frtgy frgtui frgtu ghrye frhutp frjuf I need to edit the file so that the file looks like this; (10 Replies)
Discussion started by: Lucky Ali
10 Replies

3. Shell Programming and Scripting

Shell script to find the sum of first n Fibonacci numbers

pls give me the solution for this i need it for my exam pls pls pls Shell script to find the sum of first n Fibonacci numbers (1 Reply)
Discussion started by: Kshitija
1 Replies

4. Homework & Coursework Questions

Help with shell script to find sum of first n numbers of Fibonacci series

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Shell script to find sum of first n numbers of Fibonacci series 2. Relevant commands, code, scripts,... (0 Replies)
Discussion started by: Kshitija
0 Replies

5. UNIX for Dummies Questions & Answers

Why does fibonacci sequence script stop making sense at 92nd iteration?

So, Just for practice, I wrote a simple fibonacci sequence script in bash. (03:08:02\$ cat fib #!/usr/bin/bash ret () { echo -ne "\n" sleep .5 } a=1 b=2 echo -n $a #1 A ret echo -n $b #2 B ret (8 Replies)
Discussion started by: DeCoTwc
8 Replies

6. Shell Programming and Scripting

Need to find the gap in the sequence of numbers

Hi Guys, I have a file with numbers in sequence. The sequence have been broken somewhere.. I need to find out at which number the sequence has been broken... For an example, consider this sequence, it needs to give me output as 4 (as 5 is missing) and 6(as 7 is missing) Thanks for... (3 Replies)
Discussion started by: mac4rfree
3 Replies

7. Shell Programming and Scripting

How to find the matched numbers between 2 text file using perl program??

hi dudes, I nee you kind assistance, I have to find the matched numbers from 2 text files and output of matched numbers should be in another text file.. I do have text files like this , for example File 1 787 665*5-p 5454 545-p 445-p 5454*-p File 2 5455 787 445-p 4356 2445 144 ... (3 Replies)
Discussion started by: sureshraj
3 Replies

8. Shell Programming and Scripting

find common entries and match the number with long sequence and cut that sequence in output

Hi all, I have a file like this ID 3BP5L_HUMAN Reviewed; 393 AA. AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3; DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot. DT 05-JUL-2004, sequence version 1. DT 05-SEP-2012, entry version 71. FT COILED 59 140 ... (1 Reply)
Discussion started by: manigrover
1 Replies

9. Shell Programming and Scripting

Find common numbers and print yes or no

Hi I have 2 files with following data First file, sp|Q676U5|A16L1_HUMAN, Autophagy-related protein 16-1 OS=Homo sapiens GN=ATG16L1 PE=1 SV=2, Maximum coiled-coil residue probability: 0.657 in position 163. Maximum dimeric residue probability: 0.288 in position 163. ... (1 Reply)
Discussion started by: manigrover
1 Replies

10. Programming

Program wont print prime numbers

The problem I'm having is that when you put in the two numbers the answer is just prime.... nothing. I cannot figure this out ive been working on this forever, can someone please god just tell me how to fix this without encrypted "hints". #include <iostream> #include <cmath> using... (3 Replies)
Discussion started by: c++newb
3 Replies
Config::MVP::Assembler(3pm)				User Contributed Perl Documentation			       Config::MVP::Assembler(3pm)

NAME
Config::MVP::Assembler - multivalue-property config-loading state machine VERSION
version 2.200002 DESCRIPTION
First, you should probably read the example of using Config::MVP. If you already know how it works, keep going. Config::MVP::Assembler is a helper for constructing a Config::MVP::Sequence object. It's a very simple state machine that lets you signal what kind of events you've encountered while reading configuration. ATTRIBUTES
sequence_class This attribute stores the name of the class to be used for the assembler's sequence. It defaults to Config::MVP::Sequence. section_class This attribute stores the name of the class to be used for sections created by the assembler. It defaults to Config::MVP::Section. sequence This is the sequence that the assembler is assembling. It defaults to a new instance of the assembler's "sequence_class". METHODS
begin_section $assembler->begin_section($package_moniker, $name); $assembler->begin_section($package_moniker); $assembler->begin_section( $package ); This method tells the assembler that it should begin work on a new section with the given identifier. If it is already working on a section, an error will be raised. See "change_section" for a method to begin a new section, ending the current one if needed. The package moniker is expanded by the "expand_package" method. The name, if not given, defaults to the package moniker. These data are used to create a new section and the section is added to the end of the sequence. If the package argument is a reference, it is used as the literal value for the package, and no expansion is performed. If it is a reference to undef, a section with no package is created. end_section $assembler->end_section; This ends the current section. If there is no current section, an exception is raised. change_section $assembler->change_section($package_moniker, $name); $assembler->change_section($package_moniker); This method calls "begin_section", first calling "end_section" if needed. add_value $assembler->add_value( $name => $value ); This method tells the assembler that it has encountered a named value and should add it to the current section. If there is no current section, an exception is raised. (If this is not the first time we've seen the name in the section and it's not a multivalue property, the section class will raise an exception on its own.) expand_package This method is passed a short identifier for a package and is expected to return the full name of the module to load and package to interrogate. By default it simply returns the name it was passed, meaning that package names must be given whole to the "change_section" method. current_section This returns the section object onto which the assembler is currently adding values. If no section has yet been created, this method will return false. TYPICAL USE
my $assembler = Config::MVP::Assembler->new; # Maybe you want a starting section: my $starting_section = $assembler->section_class->new({ name => '_' }); $assembler->sequence->add_section($section_starting); # We'll add some values, which will go to the starting section: $assembler->add_value(x => 10); $assembler->add_value(y => 20); # Change to a new section... $assembler->change_section($moniker); # ...and add values to that section. $assembler->add_value(x => 100); $assembler->add_value(y => 200); The code above creates an assembler and populates it step by step. In the end, to get values, you could do something like this: my @output; for my $section ($assembler->sequence->sections) { push @output, [ $section->name, $section->package, $section->payload ]; } When changing sections, the given section "moniker" is used for the new section name. The result of passing that moniker to the assembler's "expand_package" method is used as the section's package name. (By default, this method does nothing.) The new section's "multivalue_args" and "aliases" are determined by calling the "mvp_multivalue_args" and "mvp_aliases" methods on the package. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-03-16 Config::MVP::Assembler(3pm)
All times are GMT -4. The time now is 09:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy