I stumbled across some interesting documentation regarding PICK programming:
http://www.d3ref.com/?token=flash.basic
It says FlashBASIC is a compiled, instead of interpreted, version of PICK programs that are interoperable with PICK. This is great. I am curious about how it describes Object code:
converts Pick/BASIC source code into a list of binary instructions
called object code.
Is this object code interoperable with other languages? Or is it limited to the PICK & Universe operating environment? In other words could a C program call a FlashBASIC program?
This is helpful in defining the C version, but cannot find any clear definition of the FlashBasic version:
What's an object file in C?
You're asking a few different questions which I'll try to answer.
Here is an article I wrote that might help your understanding of FlashBASIC. In short, where traditional MV BASIC is compiled and then run by assembler, the Flash compiler is C and generates an object module that sits below the standard BASIC object in frame space. At runtime that code is then interpreted by a C runtime. For our purposes here, there is no C interface, this is just an internal mechanism for getting code to run faster.
Note from the above that this is Not related to the "What's an object file in C?" topic because object modules in D3 are stored in D3 frames, completely unrelated to common OS-level object modules.
Now about C calling Pick - in your case D3: You can use the CP library - the docs are in the same area as the link you cited. Rather than binding with the database itself, you can also use your code in a client/server mode with the MVSP library if you're using Managed C (.NET). Or you can use any common web service client mechanism in C and setup D3 as a web service server with a number of technologies including MVST, mv.NET, Java, or C/C++.
I know that response is rather vague but you're asking a question which has been discussed at-length in forums over a period of years. If you ask a more specific question you'll get a specific answer. Feel free to refine your query in a comment and we can focus the answer.
Also note that you tagged this question as "u2". If you are really using the U2 variant of MV/Pick (Universe or Unidata) then the reference to the D3 docs was misleading and none of the above applies, as they do this differently in U2 and there is no FlashBASIC there. I know, you're confused. Let's work it out...
Yep, Flash BASIC just translates to C, is compiled, and resulting object files are dynamically loaded and linked, then run from the Pick OS. The feature of C programs running and interacting with BASIC was certainly possible, but we did not implement that feature.
I am currently trying to use some BLAS functions. I see the documentation and know what I want to use, but the described functions are nowhere in the actual source code in BLAS. I just don't get it.
I am trying to find blas_xmax_val. This is mentioned in the documentation on page 42. However, I do not see the function anywhere in the source folder.
If anyone has used BLAS before, please can you tell me what's going on here? Where am I supposed to look for it? It's not even mentioned in cblas.h.
This is not the only function with this problem. I see many functions mentioned in the documentation, but not in the source folder.
Please help!
I think this is the report of a technical forum that's recommending changes for BLAS that were just never adopted.
The only BLAS maximum functions I'm aware of are the IxAMAX() (x in {S,D,C,Z}) family, which return the index of the first occurrence of the maximum value.
The paper you point to is documentation for a code library created by its authors, and not a standard part of the C language. You have to get the code from them and install it, or find someone who has already done that. The code is freely available at http://netlib.org/blas/
A better-known library for doing this sort of thing is GSL, which might be easier to find an install (it's already installed on many Unix-like systems). http://www.gnu.org/software/gsl/
I am using libgit2 via an FFI in another language but I am having difficulty figuring out what various functions actually do (and I'd prefer not to resort to reading the source code unless absolutely necessary). Does anyone know where I can find some working code samples for some of the functions in libgit2?
There are many ways to help you get a start with libgit2:
A series of posts from Ben Straub, one of the core contributors
Taking a peek at the libgit2 examples which are written in a very easily understandable C code
Reading through the headers which describe each function, expected parameters and produced output
Another angle would be to look at the libgit2 tests which emphasize the behavioral contract of each function, or, if you're more familiar with other languages, peek at the test code of some of libgit2 bindings and then dive into the way they're exercising libgit2
C# -> LibGit2Sharp
Ruby -> Rugged
Python -> Pygit2
From https://libgit2.github.com/, there's the 101 Samples guide.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I sometimes need to modify OSS code or other peoples' code (usually C-based, but sometimes C++/Java) and find myself "grep"ing headers for types, function declarations etc. as I follow code flow and try to understand the system. Is there a good tool that exists to aid in code browsing. I'd love to be able to click on a type and be taken to the declaration or click on a function name and be taken to it's implementation. I'm on a linux box, so replies like "just use Visual Studio" won't necessarily work for me. Thanks!
You can't get anything better than SourceInsight.
I use Vim with ctags and taglist plugins. You can move the cursor to a variable name and with a key combination it will take you to the declaration of the variable (and back). Taglist will also show an overview of all functions, classes etc. in a side bar.
I've heard amazing things about OpenGrok. I know another team at my place of employ uses it and they find it very handly. From its web site:
OpenGrok is a fast and usable source
code search and cross reference
engine. It helps you search,
cross-reference and navigate your
source tree. It can understand various
program file formats and version
control histories like Mercurial, Git,
SCCS, RCS, CVS, Subversion, Teamware,
ClearCase, Perforce and Bazaar. In
other words it lets you grok
(profoundly understand) the open
source, hence the name OpenGrok. It is
written in Java.
Doxygen can generate an set of web pages that include a source browser. Not quite as fancy as an IDE, but all it needs is a web browser.
The Eclipse IDE is capable of working with C/C++ in addition to Java. There is a write-up on how to configure Eclipse for C/C++ development on IBM's Developer Works site.
edit: Why has this been voted down? It is a valid answer. Eclipse with the C/C++ addon will allow the question author to do what he is wanting to do. I am not the only one to have suggested, yet the others have not been voted down. So why has this one been voted down?
I do a bit in the kernel space, and keep coming back the scope.
For example:
$ cd /usr/src/redhat/BUILD/kernel-version
$ cscope -R -p4
Find this C symbol:
Find this function definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
I usually "live" in c-scope when working on someone elses project. I use this to open files with "gvim" (my IDE), edit things, then quit "back" to c-scope, It helps me keep task focused.
I believe that cscope can be configured to work with vim and emacs, although I've seen people use other editors also.
Best of luck to you.
Vim and Ctags works for me.
If you're looking for something simple and ubiquitous, try etags. It's not going to be as good as the heavyweight tools, but it's on pretty much everything and it works with emacs. Use ctags for vi.
ctags is very useful. There are two steps involved. First run the program ctags on all your source and include directories. This creates a file named 'tags' in the local directory. ctags *.c *.h would do fine if all your source is in a single directory. When you work with source in multiple directories, it can be worth running ctags in multiple locations. Then, within vi, with your cursor on any function, defined type or variable use ctl-] to go to the definition of that entity. Use etags if you're using emacs.
Doxygen is wonderful. I've had to get across several legacy code bases that I was never involved in before, and it's been fantastic for that (even though the code bases were not documented using Doxygen format).
Go for Doxygen and set EXTRACT_ALL to YES. It is simply powerful and easy. Once you love it, you can stick to it across all platforms and languages.
http://www.doxygen.org
If you are involved in projects which have a mix of HLL code along with Assembly i'd recommend Opengrok, i have recently shifted to Opengrok and find it amazing, Opengrok + Firefox + Extensions is the best combination in my opinion, a few firefox extensions like Scrapbook etc allow you to modify and add notes while you are browsing code, again this is mostly for 'Browsing' through code and not for modifying it on the fly.
I support the use of doxygen.
This tool generated a javadoc like bunch of html pages, allowing to index all the code, to browse in it (where is this function used, and by which function...), like you can do in an IDE. It is very easy to make it work.
I had once to maintain 2000 files of C code of a 15 years old C project. It took me an hour to index the code with doxygen a provide the other developers with the generated doc. (I know, this phrase sounds like an add, but it is true... It's really a nice tool)
A wonderful tool, which works on all C-like languages.
IntelliJ is pretty good as a source browser under Linux. It's got really good support for jumping between source and function declarations. Haven't tried it with C/C++ code, but it works well with Ruby and Java.
I've not used it directly, but I have used sites created with lxr and thought it very handy. It converts your project into line-numbered and cross-referenced HTML files, using links to cross-reference function and file names. There are some examples of projects source indexed with it here.
It doesn't appear that there is a version newer than 2006, but it may still work for what you want.
I use Anjuta IDE. Not bad. Not sure how it compares to Eclipse IDE.
Any IDE will work fine.
Netbeans and Eclipse are java based but have plugins for C/C++
I use kscope, which uses cscope in the background, but provides function lists etc. as well. Seems to handle large projects like the linux kernel well too. The
kscope homepage has a good concise description of what it does and doesn't do.
cscope has always been my favorite. There is also cbrowser, but I have not tried it. ctags is also used a lot.
I use the Understand for C++. It's very handy tool to deal with large amounts of code. It also can calculate code statistics and draw call graph.
Must have!
I've had great success using doxygen. For best results (particularly when creating documentation for c++) install graphviz and enable in your doxygen configuration file.
This will automatically generate dependency maps and class diagrams that are linked to the rest of the html documentation.
Even if you are not a developer go for Source Insight
And if you are, its a MUST HAVE :)
cscope. (wanted to mod up other scope post, but i don't have karma yet).
global search and replace
find all places a function is called
find all places called by a function
find files including this file.
really simple usage: $ cscope -R
if you don't know vi, then change your EDITOR and VIEWER environmental variables to your preferred editor.
I find ID Utils quite handy. It is like an instant recursive grep. There are bunch of vim recipes to go with it.
I use and like the free software tool GNU global.
A language-sensitive source code search engine can be found
at SD Source Code Search Engine. It can handle many languages at the same time.
Searches can be performed for patterns in a specific langauge,
or patterns across languages (such as "find identifiers involving TAX").
By being sensitive to langauge tokens, the number of false positives is reduced,
saving time for the user. It understands C, C++, C#, COBOL, Java, ECMAScript, Java, XML, Verilog, VHDL, and a number of other languages.
I use Source-Navigator(TM) from here. It is quite impressive and helps a lot. It is written in Tcl/Tk, is available as an executable for windows and as source code ready to build on *nix.