hello all, gained the adhering to error when trying come compile my program. "subscripted value is neither range nor pointer" Here"s the code... const float roundOff<> = 0.0, .05, .005, .0005, .00005, .000005, .0000005, .00000005, .000000005; if(roundOff) if((digitsPastDecimal > 0) && (digitsPastDecimal valueUnion.float_variable = valueUnion.float_variable + roundOff; The last line is the line the throws the error.Looks like range to me. Any type of ideas? Thanks.


You are watching: Error: subscripted value is neither array nor pointer nor vector



*

It seems to think roundOff is not an array. Perhaps you"ve got "roundOff" accidentally identified elsewhere in your program? It"ll aid if you write-up your whole program here. Or at the very least a smaller sized version of your program that exhibits the very same symptom. Also, why "if(roundOff)"? appears odd to usage a pointer like that.


OMG, perform I feeling stupid. Girlfriend are specifically right. RoundOff is claimed as an integer that is passed right into this subroutine. It"s a flag offered to identify if the routine need to round off the value or not. I called the range bythe very same name. Exactly how stupid the me... Yet then, ns knew it had to be stupid. It virtually always is. Periodically you simply look and look and also can"t view what is staring girlfriend in the face. Thanks for the input.


See more: “ Autumn Begins In Martins Ferry Ohio ”, “Autumn Begins In Martins Ferry, Ohio”

*
Jump to: run to- - - - - - - - - - - - - - MPLAB Xpress- - - - MPLAB X IPE- - - - MPLAB ICD4 Debugger- - - - MPLAB PICkit 4 Debugger- - - - MPLAB Snap- - - - MPLAB® password Configurator - - - - MPLAB genuine ICE- - - - MPLAB ICD In Circuit Debuggers- - - - MPLAB Harmony- - - - MPLAB Simulator- - - - MPLAB 8 IDE- - - - MPASM, MPLINK, MPLIB (assembler, linker, librarian)- - - - MPLAB XC8- - - - HI-TECH C Compilers- - - - MPLAB C18 Compiler- - - - MPLAB XC16- - - - MPLAB C30 Compiler, ASM30, Link30 forum- - - - MPLAB XC32- - - - MPLAB C32 Compiler- - - - Visual device Initializer- - - - Evaluation and also Demonstration Boards- - - - Programmers (MPLAB PM3, PICSTART Plus, PICkit 2, PICkit 3)- - - - Emulators (MPLAB ice cream 2000, MPLAB ice 4000)- - - - Microstick development Board for dsPIC33F & PIC24H- - - - Linux, Open resource Projects and Other Topics- - - - MATLAB- - - - CML- - - - Tips and also Tricks- - - - Other advance Tool Topics- - - - Arriba principle for PIC MCUs- - - - Curiosity- - - - motorBench™ advancement Suite- - - - UNI/O™ Serial EEPROM- - - - Serial EEPROMS - I²C- - - - Serial EEPROMS - Microwire- - - - Serial EEPROMS - SPI- - - - Serial SRAM- - - - MAC resolve Chips- - - - Serial EPROM- - - - Parallel EPROM- - - - Parallel EEPROM- - - - identifier Solutions and also Plug N pat Products- - - - Serial Flash- - - - Parallel Flash- - - - smart Card- - - - RFID- - - - Literature- - - - MCP2510 Stand-alone can Controller - - - - various other Issues<8-Bit Microcontrollers>- - - - PIC Microcontrollers (PIC10F, PIC12F, PIC16F, PIC18F)- - - - legacy PIC Microcontrollers (PIC14000, PIC17, PICxxC)- - - - Peripherals / core Independent Peripherals- - - - - - - - Analog (ADC, Comp, DAC, HC I/O, OPA, PRG, SlopeComp, ZCD)- - - - - - - - Waveform manage (CCP/ECCP, PWM, PSMC, COG, CWG, NCO, DSM)- - - - - - - - Timing and also Measurements (AngTMR, HLT, PSMC, PWM, NCO, SMT, RTCC, TEMP)- - - - - - - - interactions (EUSART/AUSART, I2C/SPI, USB, CAN, LIN, KeeLoq)- - - - - - - - User interface (mTouch, HCVD, LCD)- - - - - - - - logic / safety and security & surveillance / Low strength (CLC, MULT, MathACC, CRC/SCAN, HLT, WWDT, HEF, PPS, IDLE, DO- - - - Documentation (Programming Specifications, Errata, Literature)- - - - tips & top Solutions overview & other PIC Topics<16 little bit Microcontrollers & Digital Signal controllers>- - - - dsPIC30F Topics- - - - Programming Specifications- - - - dsPIC33F Topics- - - - PIC24 Topics- - - - - - - - Graphics<32-Bit Microcontrollers>- - - - basic PIC32 Topics- - - - PIC32 Beta Release software application (not supported)- - - - FAQs- - - - general MPU Topics- - - - Linux for MPUs- - - - software Tools because that MPUs- - - - Kits and Boards for MPUs- - - - Ensemble graphic Toolkit- - - - Welcome- - - - MCP250xx devices- - - - Serial Real-Time Clocks (RTCC’s)- - - - Clock Solutions- - - - FPGA devices- - - - FPGA design and also debug tools- - - - - - - - FPGA design Tools- - - - - - - - SoC design Tools- - - - - - - - SmartHLS Tool- - - - - - - - Vectorblox AI- - - - - - - - Programming and also Debug- - - - FPGA IP cores- - - - General- - - - acquiring Started with Keeloq- - - - PPP/SLIP- - - - Ethernet- - - - Gateway- - - - TCP/IP stack v6 Beta- - - - tutorial Questions- - - - rwcchristchurchappeal.com Registered Consultants Forum- - - - Main- - - - Buy, offer or Trade- - - - - - - - - - - - Firmware Questions- - - - - - - - Hardware Questions- - - - - - - - App advance Questions- - - - WiFi- - - - Bluetooth short Energy- - - - MiWi- - - - LoRa®- - - - 802.15.4- - - - below GHz- - - - Bluetooth Audio- - - - Voice and Audio- - - - remote Control- - - - other Wireless- - - - Welcome- - - - getting Started- - - - Upcoming changes- - - - Forum FAQs- - - - Forum Support<日本語フォーラム>- - - - 開発ツール- - - - - - - - MPLAB IDE- - - - - - - - MPLAB actual ICE- - - - - - - - MPLAB ICD2- - - - - - - - MPLAB シミュレータ- - - - - - - - MPLAB C18 コンパイラ- - - - - - - - MPLAB C30 コンパイラ、ASM30、Link30- - - - - - - - 評価/デモ/開発 ボード- - - - - - - - エミュレータ(ICE2000、ICE4000)- - - - - - - - プログラマ(MPLAB PM3、PICSTART Plus、PICkit 2、ICSPなど)- - - - 8ビット PIC マイコン- - - - - - - - コア (命令、リセット、WDT、仕様、・・・)- - - - - - - - 周辺機能 (ADC、PWM、タイマ、UART、・・・)- - - - 16ビット PIC マイコン & DSC- - - - - - - - コア (命令、リセット、WDT、仕様、・・・)- - - - - - - - 周辺機能 (ADC、PWM、タイマ、UART、DMA・・・)- - - - - - - - DSP命令、機能- - - - メモリ製品- - - - - - - - I2C (24xxxx)- - - - - - - - SPI (25xxxx)- - - - - - - - MicroWire (93xxxx)- - - - アナログ & インターフェース製品<中文论坛>- - - - 8位单片机产品- - - - 16位单片机及DSC产品- - - - 模拟及存储产品- - - - 开发工具- - - - C语言及RTOS- - - - 单片机应用技术- - - - rwcchristchurchappeal.com Jobs- - - - virtual Shopping- - - - COM2109 - development to I2C- - - - COM3101 - development to full Speed USB- - - - COM3201 - designing a practice USB Peripheral Application- - - - COM3202 - developing a USB installed Host Application- - - - COM4101 - introduction to embedded Ethernet- - - - COM4301 - designing Embedded TCP/IP Monitor and Control- - - - COM4302 - advanced TCP/IP HTTP Applications- - - - COM5610 - quick LIN design Using a Pre-Certified Configurator- - - - DSP0101 - introduction to DSP Concepts- - - - DSP0201 - using DSP functions of the dsPIC® DSC Architecture- - - - DSP0202 - designing with rwcchristchurchappeal.com's DSP Libraries and also Tools- - - - HIF2131 - designing with rwcchristchurchappeal.com’s graphics Library- - - - IRF2101 - adding IEEE 802.11/Wi-Fi® come An embedded Application- - - - IRF2102 - Wireless Networking with the MiWi™ breakthrough Environment- - - - MCT0101 - overview of smart Motor regulate Solutions- - - - MCT3101 - BLDC control Techniques- - - - MCT4201 - AC Induction Motor control using dsPICDEM MCHV advancement board- - - - MCT7101 - Sensorless field Oriented manage for PMSM Motors- - - - MCU0101 - gaining Started v Baseline PIC® MCU Architecture, Instruction set and Peripheral Progra- - - - MCU1121 - Mid-Range Microcontroller household Peripheral Configuration and also Usage making use of the HI-TECH® C C- - - - MCU2101 - acquiring Started with PIC18 Architecture and also Instruction Set- - - - MCU2121 - PIC18 Microcontroller family Peripheral Configuration and also Usage making use of the C18 C Compiler- - - - MCU3101 - getting Started through rwcchristchurchappeal.com's 16-bit MCU Architecture and also Instruction Set- - - - MCU3121 - rwcchristchurchappeal.com 16-bit MCU Peripherals (Unit 1)- - - - MCU3122 - rwcchristchurchappeal.com 16-bit MCU Peripherals (Unit 2)- - - - MCU4101 - introduction to rwcchristchurchappeal.com's PIC32 MCU- - - - PWR3101 - Digital strength Converter Basics utilizing dsPIC33 Digital Signal Controllers (DSC)- - - - PWR3201 - Implementation that Digital manage Techniques for strength Converters making use of dsPIC® SMPS Family- - - - TLS0000 - getting Started with rwcchristchurchappeal.com Live Online- - - - TLS0101 - acquiring Started v rwcchristchurchappeal.com advancement Tools- - - - TLS0999 - Transitioning come MPLAB X native MPLAB 8- - - - TLS2101 - development to the C Programming Language for installed Engineers- - - - TLS2130 - gaining Started through MPLAB® C because that dsPIC DSCs and PIC24 MCUs- - - - XLP0101 - Low strength System style with nanoWatt XLP- - - - XLP1101 - Battery an option for low Power embedded Solutions