Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-02-2015, 12:48 AM   #1
Senior Member
Registered: Sep 2006
Posts: 1,414
Blog Entries: 43

Rep: Reputation: 36
PNF: Result is 0

I am creating a language in C++. It is called PNF (Portable Numbers Format). It is pretty well developed. Except for because I was creating a new language on top of it, called PNFHA (Portable Numbers Format High Level Language A), I needed new features in PNF, and therefore also PNFASM (Portable Numbers Format Assembler). I needed some new instructions and entirely new features.

I needed Ranges, Enums, and Arrays. I am working on Arrays right now. I am on the other instructions needed for Arrays. I am trying to load and store to/from an Array.

The problem is that whatever I store in it, the result comes back binary 0 (as far as binary 0 is concerned in this language). The type of the variable is TVOID, and that is why the result is 0.

There are 5 basic types in PNF. They are:


It "should" come back as whatever type I try to put in it, and whatever value I try to put in it.

I think I know WHAT the problem is, but I don't know where it is. The problem is probably that somewhere the PNF_Variable uses the default constructor to construct it, and then is left alone. Whatever constructor it uses, it should NOT be left alone. It should be filled with the appropriate values. Somehow, this is giving the result as above.

How can I use the write technique to isolate where this is going wrong? Or are there any better debugging strategies I can use? If so, what are they and how do you go about them?

If you think you know where the problem is, please also post that. Note that this is a very large and complicated program by now. It was created by just me, but it is very large and complicated. Thanks in advance!
Old 06-12-2016, 09:17 PM   #2
Senior Member
Registered: Sep 2006
Posts: 1,414

Original Poster
Blog Entries: 43

Rep: Reputation: 36
I believe I have solved it, though now I forgot what the solution was.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
am not getting any result when am using 'if', without getting result for below script alavala53 Linux - General 3 10-25-2012 06:00 PM
[SOLVED] why this result when using if :: c tushar_pandey Programming 2 08-22-2012 12:33 AM
[SOLVED] Grep for the result of a command within the result of another command jasonws Programming 6 11-18-2010 02:39 PM
Product Network Filter (PNF) Information kaplan71 Linux - Software 0 02-15-2008 01:05 PM
df gets different result from du? liyuefu Linux - General 4 10-01-2005 10:45 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration